From Luigi Calori, "when we link against something that comes out from a Find... we ususally have a variable <LINK_VAR_NAME>available like OPENTHREADS_LIBRARY,
so I' ve set up a macro that uses the variable name expanded for linking, and test if a variable ${LINK_VAR_NAME}_DEBUG
like OPENTHREADS_LIBRARY_DEBUG exists and in case uses it for linking in debug mode.
I' ve also set up FindOpenThreads to set up these variables.
I had to edit the core libraries CMakeLists to add the calls to the macros used.
I' ve tested under MSVC"
This commit is contained in:
@@ -80,10 +80,9 @@ ADD_LIBRARY(${LIB_NAME}
|
||||
Version.cpp
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||
LINK_INTERNAL(${LIB_NAME}
|
||||
osg
|
||||
${OPENTHREADS_LIBRARY}
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
LINK_CORELIB_DEFAULT(${LIB_NAME})
|
||||
|
||||
INCLUDE(ModuleInstall OPTIONAL)
|
||||
|
||||
Reference in New Issue
Block a user