Skip to content

Commit

Permalink
FIXed CMake build:generic ALIAS targets were defined incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
jkriege2 committed Jan 22, 2024
1 parent ab8ab57 commit 397d2be
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmake/jkqtplotter_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/jkqtcommon/LibTarget.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion lib/jkqtfastplotter/LibTarget.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion lib/jkqtmath/LibTarget.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion lib/jkqtmathtext/LibTarget.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion lib/jkqtplotter/LibTarget.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 397d2be

Please sign in to comment.