diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-04-23 08:31:25 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-04-24 03:45:15 +0000 |
commit | 631fec3e1bdb069466da95ebfc0f0b3de5706415 (patch) | |
tree | 3db2d54cd90bcf7bab41905dac69c3921ec80621 | |
parent | f70a7bf09b3b7fd5b835bce979535e75b381688a (diff) |
CMake: Doxygen and API reference target updates.
The DOXYGEN_* variables which we use to create doxygen.cfg are native
paths and are not compatible with Cygwin. We could try to make them
compatible, but given that we're trying to migrate away from Cygwin set
"DOXYGEN_EXECUTABLE" to "DOXYGEN_EXECUTABLE-NOTFOUND" if "cyg" is anywhere
in its path.
Add the wsar_html* targets to "Docs" and exclude them from Visual Studio's
default build.
Change-Id: Id23a3c43a9f4f1edb2d827bbf36a3a7eb64f0212
Reviewed-on: https://code.wireshark.org/review/27100
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/modules/FindDOXYGEN.cmake | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 306cabfbcd..dc2f964521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3127,6 +3127,10 @@ if (DOXYGEN_EXECUTABLE) COMMAND ${CMAKE_COMMAND} -E tar "cfv" "wsar_html.zip" --format=zip wsar_html DEPENDS wsar_html ) + set_target_properties(wsar_html wsar_html_zip PROPERTIES + FOLDER "Docs" + EXCLUDE_FROM_DEFAULT_BUILD True + ) endif(DOXYGEN_EXECUTABLE) # Test suite wrapper diff --git a/cmake/modules/FindDOXYGEN.cmake b/cmake/modules/FindDOXYGEN.cmake index 23a99fdcc6..381048989b 100644 --- a/cmake/modules/FindDOXYGEN.cmake +++ b/cmake/modules/FindDOXYGEN.cmake @@ -1,21 +1,27 @@ # -# - Find unix commands from cygwin -# This module looks for some usual Unix commands. +# - Find Doxygen +# This module looks for a native (non-Cygwin) Doxygen. # -include( FindCygwin ) - find_program( DOXYGEN_EXECUTABLE NAMES doxygen PATHS - ${CYGWIN_INSTALL_PATH}/bin /bin /usr/bin /usr/local/bin /sbin ) +# We set various paths in doxygen.cfg via configure_file(). These are +# native system paths which aren't compatible with Cygwin's Doxygen. +string(TOLOWER ${DOXYGEN_EXECUTABLE} _de_lower) +if(${_de_lower} MATCHES "cyg") + set(_ignore_reason "Cygwin Doxygen found at ${DOXYGEN_EXECUTABLE}. Ignoring.") + message(STATUS ${_ignore_reason}) + set(DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE-NOTFOUND CACHE FILEPATH ${_ignore_reason} FORCE) +endif() + include( FindPackageHandleStandardArgs ) find_package_handle_standard_args( DOXYGEN DEFAULT_MSG DOXYGEN_EXECUTABLE ) |