Skip to content

Commit

Permalink
CMake: Allow install if non-toplevel project. (#73)
Browse files Browse the repository at this point in the history
If another project vendors termcolor (via `add_subdirectory`) and tries to install, the resulting package is not usable.
By changing `CMAKE_PROJECT_NAME` to `PROJECT_NAME` in `config.cmake.in` this problem is solved.
  • Loading branch information
KerstinKeller authored Aug 6, 2024
1 parent 5635ae0 commit 3477937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake")
check_required_components("@CMAKE_PROJECT_NAME@")
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
check_required_components("@PROJECT_NAME@")

0 comments on commit 3477937

Please sign in to comment.