2022-06-21 04:49:37 +08:00
|
|
|
diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake
|
|
|
|
index ce55be0..9b7107c 100644
|
|
|
|
--- a/CMakeModules/OsgMacroUtils.cmake
|
|
|
|
+++ b/CMakeModules/OsgMacroUtils.cmake
|
2022-09-15 02:24:49 +08:00
|
|
|
@@ -37,6 +37,16 @@ SET(VALID_BUILDER_VERSION OFF)
|
2022-06-21 04:49:37 +08:00
|
|
|
|
|
|
|
MACRO(LINK_WITH_VARIABLES TRGTNAME)
|
|
|
|
FOREACH(varname ${ARGN})
|
2022-09-15 02:24:49 +08:00
|
|
|
+ string(REPLACE "_LIBRARY" "_LINK_LIBRARIES" lwv_link_libraries "${varname}")
|
|
|
|
+ if(DEFINED ${lwv_link_libraries})
|
|
|
|
+ TARGET_LINK_LIBRARIES(${TRGTNAME} ${${lwv_link_libraries}})
|
|
|
|
+ continue()
|
|
|
|
+ endif()
|
2022-06-21 04:49:37 +08:00
|
|
|
+ string(REPLACE "_LIBRARY" "_LIBRARIES" lwv_libraries "${varname}")
|
|
|
|
+ if(DEFINED ${lwv_libraries})
|
|
|
|
+ TARGET_LINK_LIBRARIES(${TRGTNAME} ${${lwv_libraries}})
|
|
|
|
+ continue()
|
|
|
|
+ endif()
|
|
|
|
IF(${varname}_DEBUG)
|
|
|
|
IF(${varname}_RELEASE)
|
|
|
|
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
|