CMake: Fix OPTION_DOCS_ONLY mode

This commit is contained in:
Jonathan G Rennison
2021-03-02 21:23:46 +00:00
parent 64dd3c2a57
commit 8d650f82ae

View File

@@ -86,6 +86,18 @@ if(OPTION_TOOLS_ONLY)
unset(HOST_BINARY_DIR CACHE) unset(HOST_BINARY_DIR CACHE)
endif() endif()
add_subdirectory(${CMAKE_SOURCE_DIR}/src) add_subdirectory(${CMAKE_SOURCE_DIR}/src)
# Cut down find_version which doesn't include cfg defines set in full configure
add_custom_target(find_version
${CMAKE_COMMAND}
-DFIND_VERSION_BINARY_DIR=${CMAKE_BINARY_DIR}/generated
-DCPACK_BINARY_DIR=${CMAKE_BINARY_DIR}
$<$<PLATFORM_ID:Windows>:-DWIN32=TRUE>
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
BYPRODUCTS ${GENERATED_SOURCE_FILES}
)
return() return()
endif() endif()