fixed problem with non-lowercase include-dirs in CMake export

This commit is contained in:
jkriege2 2024-01-27 20:48:54 +01:00
parent 0c314a5b83
commit ff988fa1a8

View File

@ -65,7 +65,8 @@ include(GNUInstallDirs)
function(jkqtplotter_installlibrary_new lib_name libIncludeSubdir libSrcDir)
function(jkqtplotter_installlibrary_new lib_name libBasename libSrcDir)
string(TOLOWER "${libBasename}" libIncludeSubdir)
# export targets (including headers!)
install(TARGETS ${lib_name}
@ -78,7 +79,6 @@ function(jkqtplotter_installlibrary_new lib_name libIncludeSubdir libSrcDir)
)
# generate ...Config.cmake
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
set(libBasename "${libIncludeSubdir}")
configure_file(${libSrcDir}/LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
# install export files
install(EXPORT ${lib_name}_TARGETS