diff --git a/cmake/jkqtplotter_macros.cmake b/cmake/jkqtplotter_macros.cmake index e8ba3ee9b7c..af19d0fc62f 100644 --- a/cmake/jkqtplotter_macros.cmake +++ b/cmake/jkqtplotter_macros.cmake @@ -101,6 +101,7 @@ 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 diff --git a/lib/jkqtcommon/LibTarget.cmake.in b/lib/jkqtcommon/LibTarget.cmake.in index 664073d74a0..e236280d768 100644 --- a/lib/jkqtcommon/LibTarget.cmake.in +++ b/lib/jkqtcommon/LibTarget.cmake.in @@ -13,5 +13,5 @@ find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets Xml REQUIRED) include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@") if(NOT TARGET JKQTPlotter::@libBasename@) - add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@@libBasename@ + add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@::@lib_name@ endif() \ No newline at end of file diff --git a/lib/jkqtfastplotter/LibTarget.cmake.in b/lib/jkqtfastplotter/LibTarget.cmake.in index dd2eb621152..f4dcd39478b 100644 --- a/lib/jkqtfastplotter/LibTarget.cmake.in +++ b/lib/jkqtfastplotter/LibTarget.cmake.in @@ -17,5 +17,5 @@ find_package(JKQTCommon@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@") if(NOT TARGET JKQTPlotter::@libBasename@) - add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@@libBasename@ + add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@::@lib_name@ endif() \ No newline at end of file diff --git a/lib/jkqtmath/LibTarget.cmake.in b/lib/jkqtmath/LibTarget.cmake.in index 7bf5d2d25ca..ac1875afd99 100644 --- a/lib/jkqtmath/LibTarget.cmake.in +++ b/lib/jkqtmath/LibTarget.cmake.in @@ -15,5 +15,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@") if(NOT TARGET JKQTPlotter::@libBasename@) - add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@@libBasename@ + add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@::@lib_name@ endif() \ No newline at end of file diff --git a/lib/jkqtmathtext/LibTarget.cmake.in b/lib/jkqtmathtext/LibTarget.cmake.in index 8d0ea2269b3..223877acb50 100644 --- a/lib/jkqtmathtext/LibTarget.cmake.in +++ b/lib/jkqtmathtext/LibTarget.cmake.in @@ -16,5 +16,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@") if(NOT TARGET JKQTPlotter::@libBasename@) - add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@@libBasename@ + add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@::@lib_name@ endif() \ No newline at end of file diff --git a/lib/jkqtplotter/LibTarget.cmake.in b/lib/jkqtplotter/LibTarget.cmake.in index 70c9481a2cd..203c83f0c61 100644 --- a/lib/jkqtplotter/LibTarget.cmake.in +++ b/lib/jkqtplotter/LibTarget.cmake.in @@ -16,5 +16,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@") if(NOT TARGET JKQTPlotter::@libBasename@) - add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@@libBasename@ + add_library(JKQTPlotter::@libBasename@ ALIAS JKQTPlotter@QT_VERSION_MAJOR@::@lib_name@ endif() \ No newline at end of file