adaptations for cmake changes mid 2015 (SelectLibraryConfigurations.cmake) with SelectLibraryConfigurations.cmake

collada zlib debug library linking added
This commit is contained in:
Laurens Voerman 2016-09-30 14:59:51 +02:00
parent 70e931fda2
commit cba84f74aa
2 changed files with 15 additions and 2 deletions

View File

@ -186,7 +186,16 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
FIND_PACKAGE(ZLIB) FIND_PACKAGE(ZLIB)
IF (ZLIB_FOUND) IF (ZLIB_FOUND)
IF (ZLIB_LIBRARY_RELEASE)
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY_RELEASE}" CACHE FILEPATH "" FORCE)
ELSE(ZLIB_LIBRARY_RELEASE)
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE) SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
ENDIF(ZLIB_LIBRARY_RELEASE)
IF (ZLIB_LIBRARY_DEBUG)
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY_DEBUG}" CACHE FILEPATH "" FORCE)
ELSE(ZLIB_LIBRARY_DEBUG)
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${COLLADA_ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
ENDIF(ZLIB_LIBRARY_DEBUG)
ELSE(ZLIB_FOUND) ELSE(ZLIB_FOUND)
IF(WIN32) IF(WIN32)
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY FIND_LIBRARY(COLLADA_ZLIB_LIBRARY

View File

@ -38,7 +38,11 @@ SET(VALID_BUILDER_VERSION OFF)
MACRO(LINK_WITH_VARIABLES TRGTNAME) MACRO(LINK_WITH_VARIABLES TRGTNAME)
FOREACH(varname ${ARGN}) FOREACH(varname ${ARGN})
IF(${varname}_DEBUG) IF(${varname}_DEBUG)
IF(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
ELSE(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}") TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
ENDIF(${varname}_RELEASE)
ELSE(${varname}_DEBUG) ELSE(${varname}_DEBUG)
TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" ) TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" )
ENDIF(${varname}_DEBUG) ENDIF(${varname}_DEBUG)