From 1cf92135924ab83bae7ec21c104731dae9bec0b5 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 28 Jan 2023 22:25:37 -0500 Subject: [PATCH] Cmake install components --- CMakeLists.txt | 2 -- src/CMakeLists.txt | 2 ++ src/app/CMakeLists.txt | 5 ++++- src/qtk/CMakeLists.txt | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e0e3d7..cc37ce7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,9 +124,7 @@ endif() set(ASSIMP_BUILD_TESTS OFF CACHE STRING "Do not build assimp tests." FORCE) set(ASSIMP_INSTALL ON CACHE STRING "Use assimp as a submodule." FORCE) set(ASSIMP_WARNINGS_AS_ERRORS OFF CACHE STRING "No warnings as errors." FORCE) -set(ASSIMP_INJECT_DEBUG_POSTFIX OFF CACHE STRING "Do not postfix assimp with -dev" FORCE) set(BUILD_SHARED_LIBS OFF CACHE STRING "Build static assimp libs" FORCE) -set(ASSIMP_OPT_BUILD_PACKAGES ON CACHE STRING "Build static assimp libs" FORCE) if(QTK_UPDATE_SUBMODULES) message(STATUS "[Qtk] Updating submodules...") submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7c9d6e4..710afd6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,12 +26,14 @@ install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + COMPONENT libqtk DESTINATION lib/cmake/${PROJECT_NAME} ) install( EXPORT qtk_export FILE ${PROJECT_NAME}Targets.cmake NAMESPACE ${PROJECT_NAME}:: + COMPONENT libqtk DESTINATION lib/cmake/${PROJECT_NAME} ) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index bf040a5..d6b768b 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -33,6 +33,7 @@ target_link_libraries(qtk_plugin_library PUBLIC Qt6::UiPlugin qtk_library) install( TARGETS qtk_plugin_library + COMPONENT qtk_collection LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static RUNTIME DESTINATION bin @@ -61,6 +62,7 @@ target_link_libraries(qtk_collection PUBLIC qtk_plugin_library) install( TARGETS qtk_collection + COMPONENT qtk_collection LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static RUNTIME DESTINATION bin @@ -110,6 +112,7 @@ set_target_properties( install( TARGETS qtk_main + COMPONENT qtk BUNDLE DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static @@ -121,7 +124,7 @@ qt_generate_deploy_app_script( FILENAME_VARIABLE QTK_DEPLOY_SCRIPT NO_UNSUPPORTED_PLATFORM_ERROR ) -install(SCRIPT ${QTK_DEPLOY_SCRIPT}) +install(SCRIPT ${QTK_DEPLOY_SCRIPT} COMPONENT qtk) if(WIN32) if(MSVC AND TARGET Qt6::qmake) diff --git a/src/qtk/CMakeLists.txt b/src/qtk/CMakeLists.txt index 4804f3c..2cc13fa 100644 --- a/src/qtk/CMakeLists.txt +++ b/src/qtk/CMakeLists.txt @@ -83,6 +83,7 @@ install( TARGETS qtk_library # Associate qtk_library target with qtk-export EXPORT qtk_export + COMPONENT libqtk FILE_SET HEADERS DESTINATION include INCLUDES DESTINATION include LIBRARY DESTINATION lib