diff --git a/.gitignore b/.gitignore index e5135b7..a4cfc5d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/build +/build* /.vscode .DS_Store \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index afabc83..2f51d7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/README.md b/README.md index a89d474..e07d208 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b6f8111..d824879 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,7 +21,7 @@ CPMAddPackage( ) if (TEST_INSTALLED_VERSION) - find_package(Greeter) + find_package(Greeter REQUIRED) else() CPMAddPackage( NAME Greeter