From faf9419af941e0c392376300280edd167025cd03 Mon Sep 17 00:00:00 2001 From: elser Date: Thu, 28 Sep 2023 12:16:44 -0400 Subject: [PATCH] fix build issue in release, tests were trying to install but not build --- CMakeLists.txt | 95 ++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa281e40..849c374f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -669,54 +669,57 @@ install( COMPONENT library EXCLUDE_FROM_ALL) -install( - TARGETS cesium.omniverse.cpp.tests.plugin - ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install - LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install - RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install) -install( - TARGETS cesium.omniverse.cpp.tests.plugin - RUNTIME_DEPENDENCIES - DIRECTORIES - ${INSTALL_SEARCH_PATHS} - PRE_EXCLUDE_REGEXES - ${INSTALL_PRE_EXCLUDE_REGEXES} - POST_EXCLUDE_REGEXES - ${INSTALL_POST_EXCLUDE_REGEXES} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL - RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL) -install( - TARGETS CesiumOmniverseCppTestsPythonBindings - ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install - LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install - RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install) +if(CESIUM_OMNI_ENABLE_TESTS) + install( + TARGETS cesium.omniverse.cpp.tests.plugin + ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install + LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install + RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install) + install( + TARGETS cesium.omniverse.cpp.tests.plugin + RUNTIME_DEPENDENCIES + DIRECTORIES + ${INSTALL_SEARCH_PATHS} + PRE_EXCLUDE_REGEXES + ${INSTALL_PRE_EXCLUDE_REGEXES} + POST_EXCLUDE_REGEXES + ${INSTALL_POST_EXCLUDE_REGEXES} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL) -install( - TARGETS CesiumOmniverseCppTestsPythonBindings - RUNTIME_DEPENDENCIES - DIRECTORIES - ${INSTALL_SEARCH_PATHS} - PRE_EXCLUDE_REGEXES - ${INSTALL_PRE_EXCLUDE_REGEXES} - POST_EXCLUDE_REGEXES - ${INSTALL_POST_EXCLUDE_REGEXES} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL - RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} - COMPONENT library - EXCLUDE_FROM_ALL) + install( + TARGETS CesiumOmniverseCppTestsPythonBindings + ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install + LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install + RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install) + + install( + TARGETS CesiumOmniverseCppTestsPythonBindings + RUNTIME_DEPENDENCIES + DIRECTORIES + ${INSTALL_SEARCH_PATHS} + PRE_EXCLUDE_REGEXES + ${INSTALL_PRE_EXCLUDE_REGEXES} + POST_EXCLUDE_REGEXES + ${INSTALL_POST_EXCLUDE_REGEXES} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + EXCLUDE_FROM_ALL) +endif() install( DIRECTORY "${PROJECT_SOURCE_DIR}/include/"