Fixed: Use debug or release versions of C++ libraries (CppTest, STLport, Squish and Luabind)

hg/feature/sound
kervala 14 years ago
parent c7f0dab429
commit a6c5356761

@ -3,14 +3,14 @@
#
# This module defines
# CPPTEST_INCLUDE_DIR, where to find tiff.h, etc.
# CPPTEST_LIBRARY, where to find the CppTest library.
# CPPTEST_LIBRARIES, where to find the CppTest libraries.
# CPPTEST_FOUND, If false, do not try to use CppTest.
# also defined, but not for general use are
IF(CPPTEST_LIBRARY AND CPPTEST_INCLUDE_DIR)
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
# in cache already
SET(CPPTEST_FIND_QUIETLY TRUE)
ENDIF(CPPTEST_LIBRARY AND CPPTEST_INCLUDE_DIR)
ENDIF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
FIND_PATH(CPPTEST_INCLUDE_DIR
cpptest.h
@ -24,7 +24,7 @@ FIND_PATH(CPPTEST_INCLUDE_DIR
PATH_SUFFIXES cppunit
)
FIND_LIBRARY(CPPTEST_LIBRARY
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
cpptest
PATHS
/usr/local/lib
@ -38,14 +38,39 @@ FIND_LIBRARY(CPPTEST_LIBRARY
/usr/freeware/lib64
)
IF(CPPTEST_LIBRARY AND CPPTEST_INCLUDE_DIR)
SET(CPPTEST_FOUND "YES")
FIND_LIBRARY(CPPTEST_LIBRARY_DEBUG
cpptestd
PATHS
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(CPPTEST_INCLUDE_DIR)
IF(CPPTEST_LIBRARY_RELEASE)
SET(CPPTEST_FOUND "YES")
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
IF(CPPTEST_LIBRARY_DEBUG)
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
ENDIF(CPPTEST_LIBRARY_DEBUG)
ENDIF(CPPTEST_LIBRARY_RELEASE)
ENDIF(CPPTEST_INCLUDE_DIR)
IF(CPPTEST_FOUND)
IF(NOT CPPTEST_FIND_QUIETLY)
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARY}")
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
ENDIF(NOT CPPTEST_FIND_QUIETLY)
ELSE(CPPTEST_LIBRARY AND CPPTEST_INCLUDE_DIR)
ELSE(CPPTEST_FOUND)
IF(NOT CPPTEST_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find CppTest!")
ENDIF(NOT CPPTEST_FIND_QUIETLY)
ENDIF(CPPTEST_LIBRARY AND CPPTEST_INCLUDE_DIR)
ENDIF(CPPTEST_FOUND)
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)

@ -1,14 +1,14 @@
# - Locate Luabind library
# This module defines
# LUABIND_LIBRARY, the library to link against
# LUABIND_LIBRARIES, the libraries to link against
# LUABIND_FOUND, if false, do not try to link to LUABIND
# LUABIND_INCLUDE_DIR, where to find headers.
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
# in cache already
SET(LUABIND_FIND_QUIETLY TRUE)
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
@ -27,8 +27,8 @@ FIND_PATH(LUABIND_INCLUDE_DIR
)
FIND_LIBRARY(LUABIND_LIBRARY
NAMES luabind libluabind luabind_d libluabind_d libluabindd
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
NAMES luabind libluabind
PATHS
$ENV{LUABIND_DIR}/lib
/usr/local/lib
@ -42,14 +42,40 @@ FIND_LIBRARY(LUABIND_LIBRARY
/usr/freeware/lib64
)
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
NAMES luabind_d libluabind_d libluabindd
PATHS
$ENV{LUABIND_DIR}/lib
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
SET(LUABIND_FOUND "YES")
IF(LUABIND_INCLUDE_DIR)
IF(LUABIND_LIBRARY_RELEASE)
SET(LUABIND_FOUND "YES")
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE}")
IF(LUABIND_LIBRARY_DEBUG)
SET(LUABIND_LIBRARIES "${LUABIND_LIBRARIES};debug;${LUABIND_LIBRARY_DEBUG}")
ENDIF(LUABIND_LIBRARY_DEBUG)
ENDIF(LUABIND_LIBRARY_RELEASE)
ENDIF(LUABIND_INCLUDE_DIR)
IF(LUABIND_FOUND)
IF(NOT LUABIND_FIND_QUIETLY)
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}")
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
ENDIF(NOT LUABIND_FIND_QUIETLY)
ELSE(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
ELSE(LUABIND_FOUND)
IF(NOT LUABIND_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Luabind!")
ENDIF(NOT LUABIND_FIND_QUIETLY)
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
ENDIF(LUABIND_FOUND)
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG)

@ -73,7 +73,7 @@ IF(STLPORT_INCLUDE_DIR)
SET(STLPORT_LIBRARIES "optimized;${STLPORT_LIBRARY_RELEASE}")
IF(STLPORT_LIBRARY_DEBUG)
SET(STLPORT_LIBRARIES ";debug;${STLPORT_LIBRARY_DEBUG}")
SET(STLPORT_LIBRARIES "${STLPORT_LIBRARIES};debug;${STLPORT_LIBRARY_DEBUG}")
ENDIF(STLPORT_LIBRARY_DEBUG)
ENDIF(STLPORT_LIBRARY_RELEASE)
ENDIF(STLPORT_INCLUDE_DIR)

@ -3,14 +3,14 @@
#
# This module defines
# SQUISH_INCLUDE_DIR, where to find squish.h
# SQUISH_LIBRARY, where to find the Squish library.
# SQUISH_LIBRARIES, where to find the Squish libraries.
# SQUISH_FOUND, If false, do not try to use Squish.
# also defined, but not for general use are
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
# in cache already
SET(SQUISH_FIND_QUIETLY TRUE)
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
ENDIF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
FIND_PATH(SQUISH_INCLUDE_DIR
squish.h
@ -24,7 +24,7 @@ FIND_PATH(SQUISH_INCLUDE_DIR
PATH_SUFFIXES cppunit
)
FIND_LIBRARY(SQUISH_LIBRARY
FIND_LIBRARY(SQUISH_LIBRARY_RELEASE
squish
PATHS
/usr/local/lib
@ -38,14 +38,39 @@ FIND_LIBRARY(SQUISH_LIBRARY
/usr/freeware/lib64
)
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
SET(SQUISH_FOUND "YES")
FIND_LIBRARY(SQUISH_LIBRARY_DEBUG
squishd
PATHS
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(SQUISH_INCLUDE_DIR)
IF(SQUISH_LIBRARY_RELEASE)
SET(SQUISH_FOUND "YES")
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
IF(SQUISH_LIBRARY_DEBUG)
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
ENDIF(SQUISH_LIBRARY_DEBUG)
ENDIF(SQUISH_LIBRARY_RELEASE)
ENDIF(SQUISH_INCLUDE_DIR)
IF(SQUISH_FOUND)
IF(NOT SQUISH_FIND_QUIETLY)
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARY}")
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
ENDIF(NOT SQUISH_FIND_QUIETLY)
ELSE(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
ELSE(SQUISH_FOUND)
IF(NOT SQUISH_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Squish!")
ENDIF(NOT SQUISH_FIND_QUIETLY)
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
ENDIF(SQUISH_FOUND)
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)

@ -4,7 +4,7 @@ ADD_EXECUTABLE(hls_bank_maker ${SRC})
INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(hls_bank_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
TARGET_LINK_LIBRARIES(hls_bank_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARIES} nelmisc nel3d)
NL_DEFAULT_PROPS(hls_bank_maker "NeL, Tools, 3D: hls_bank_maker")
NL_ADD_RUNTIME_FLAGS(hls_bank_maker)

@ -4,8 +4,8 @@ ADD_EXECUTABLE(panoply_maker ${SRC})
INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(panoply_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
TARGET_LINK_LIBRARIES(panoply_maker ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARIES} nelmisc nel3d)
NL_DEFAULT_PROPS(panoply_maker "NeL, Tools, 3D: panoply_maker")
NL_ADD_RUNTIME_FLAGS(panoply_maker)
INSTALL(TARGETS panoply_maker RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d)
INSTALL(TARGETS panoply_maker RUNTIME DESTINATION bin COMPONENT tools3d)

@ -4,7 +4,7 @@ ADD_EXECUTABLE(tga2dds ${SRC})
INCLUDE_DIRECTORIES(${SQUISH_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(tga2dds ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
TARGET_LINK_LIBRARIES(tga2dds ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARIES} nelmisc nel3d)
NL_DEFAULT_PROPS(tga2dds "NeL, Tools, 3D: tga2dds")
NL_ADD_RUNTIME_FLAGS(tga2dds)

@ -4,7 +4,7 @@ ADD_EXECUTABLE(nel_unit_test ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CPPTEST_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_unit_test ${CPPTEST_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nelnet nelligo)
TARGET_LINK_LIBRARIES(nel_unit_test ${CPPTEST_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nelnet nelligo)
NL_DEFAULT_PROPS(nel_unit_test "Unit Tests")
NL_ADD_RUNTIME_FLAGS(nel_unit_test)

@ -81,11 +81,10 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS}
nelpacs
${LIBXML2_LIBRARIES}
${LUA_LIBRARIES}
${LUABIND_LIBRARY}
${LUABIND_LIBRARIES}
${CURL_LIBRARIES}
${LIBWWW_LIBRARIES}
${SEVENZIP_LIBRARY}
${EXPAT_LIBRARY}) # TODO: find expat cleanly using a find script
${SEVENZIP_LIBRARY})
IF(NOT APPLE AND NOT WIN32)
TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES})

Loading…
Cancel
Save