mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-08-30 21:51:12 +02:00
revert install path and set find_package in tests to REQUIRED
This commit is contained in:
parent
9084218192
commit
991d397433
4 changed files with 10 additions and 10 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
/build
|
||||
/build*
|
||||
/.vscode
|
||||
.DS_Store
|
|
@ -69,10 +69,10 @@ write_basic_package_version_file(
|
|||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
LIBRARY DESTINATION lib/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION lib/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Development
|
||||
LIBRARY DESTINATION lib COMPONENT Runtime
|
||||
ARCHIVE DESTINATION lib COMPONENT Development
|
||||
RUNTIME DESTINATION bin COMPONENT Runtime
|
||||
PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Development
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT Development
|
||||
BUNDLE DESTINATION bin COMPONENT Runtime
|
||||
)
|
||||
|
||||
|
@ -81,12 +81,12 @@ include(CMakePackageConfigHelpers)
|
|||
configure_package_config_file(
|
||||
"${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
INSTALL_DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT ${PROJECT_NAME}Targets
|
||||
DESTINATION lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
DESTINATION lib/cmake
|
||||
)
|
||||
|
||||
install(
|
||||
|
@ -94,10 +94,10 @@ install(
|
|||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
DESTINATION
|
||||
lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
lib/cmake
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
DESTINATION include
|
||||
)
|
||||
|
|
|
@ -80,7 +80,7 @@ See [Format.cmake](https://github.com/TheLartians/Format.cmake) for more options
|
|||
|
||||
- How do I package my library / executable into an installer?
|
||||
|
||||
See the [CPack](https://cmake.org/cmake/help/latest/module/CPack.html) documentation.
|
||||
As there are a lot of possible options and configurations, this is not in the scope of this template. See the [CPack documentation](https://cmake.org/cmake/help/latest/module/CPack.html) for more info.
|
||||
|
||||
## Coming soon
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ CPMAddPackage(
|
|||
)
|
||||
|
||||
if (TEST_INSTALLED_VERSION)
|
||||
find_package(Greeter)
|
||||
find_package(Greeter REQUIRED)
|
||||
else()
|
||||
CPMAddPackage(
|
||||
NAME Greeter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue