Skip to content

Commit

Permalink
Improvements for when used as a git submodule
Browse files Browse the repository at this point in the history
- don't do feature_summary, let the main repo do that
- do generate the forwarding header
  • Loading branch information
dfaure-kdab authored and Allen Winter committed Dec 22, 2023
1 parent 46e3445 commit 8a1145c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ endif()
if(${PROJECT_NAME}_IS_ROOT_PROJECT)
# Add uninstall target (not for submodules since parent projects typically have uninstall too)
include(ECMUninstallTarget)
endif()

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
18 changes: 9 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ install(
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR}
)

include(ECMGenerateHeaders)
ecm_generate_headers(
kdsingleapplication_HEADERS
HEADER_NAMES
KDSingleApplication
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/KDSingleApplication
)

if(${PROJECT_NAME}_IS_ROOT_PROJECT)
install(
EXPORT kdsingleapplicationTargets
Expand All @@ -73,15 +82,6 @@ if(${PROJECT_NAME}_IS_ROOT_PROJECT)
DESTINATION "${INSTALL_LIBRARY_DIR}/cmake/KDSingleApplication${KDSingleApplication_LIBRARY_QTID}"
)

include(ECMGenerateHeaders)
ecm_generate_headers(
kdsingleapplication_HEADERS
HEADER_NAMES
KDSingleApplication
OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/KDSingleApplication
)

install(FILES ${kdsingleapplication_HEADERS} DESTINATION ${KDSINGLEAPPLICATION_INCLUDEDIR})

if(MSVC AND NOT ${PROJECT_NAME}_STATIC)
Expand Down

0 comments on commit 8a1145c

Please sign in to comment.