From 2d93e27643ce5ca382b06c6caf4e399d9aa1ee84 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 26 Sep 2010 23:27:52 +0200 Subject: [PATCH] Fixed: Compilation with STLport under Linux (and probably Mac OS X) --- code/CMakeModules/FindSTLport.cmake | 2 +- code/nel/samples/misc/command/CMakeLists.txt | 2 +- code/nel/src/3d/CMakeLists.txt | 28 +++++++++++-------- code/nel/src/3d/driver/opengl/CMakeLists.txt | 6 +++- code/nel/src/georges/CMakeLists.txt | 4 +++ code/nel/src/ligo/CMakeLists.txt | 4 +++ code/nel/src/logic/CMakeLists.txt | 4 +++ code/nel/src/net/CMakeLists.txt | 4 +++ code/nel/src/pacs/CMakeLists.txt | 4 +++ code/nel/src/sound/CMakeLists.txt | 4 +++ code/nel/src/sound/driver/CMakeLists.txt | 4 +++ .../src/sound/driver/openal/CMakeLists.txt | 4 +++ .../tools/misc/message_box_qt/CMakeLists.txt | 2 +- code/ryzom/client/src/CMakeLists.txt | 2 +- .../common/src/game_share/CMakeLists.txt | 5 ++++ .../server/src/admin_modules/CMakeLists.txt | 4 +++ .../src/gameplay_module_lib/CMakeLists.txt | 7 ++++- code/ryzom/server/src/pd_lib/CMakeLists.txt | 2 +- 18 files changed, 73 insertions(+), 19 deletions(-) diff --git a/code/CMakeModules/FindSTLport.cmake b/code/CMakeModules/FindSTLport.cmake index 0cd1ec993..a235d42f3 100644 --- a/code/CMakeModules/FindSTLport.cmake +++ b/code/CMakeModules/FindSTLport.cmake @@ -69,7 +69,7 @@ FIND_LIBRARY(STLPORT_LIBRARY_RELEASE IF(STLPORT_INCLUDE_DIR) IF(STLPORT_LIBRARY_RELEASE) - SET(STLPORT_FOUND "YES") + SET(STLPORT_FOUND TRUE) SET(STLPORT_LIBRARIES "optimized;${STLPORT_LIBRARY_RELEASE}") IF(STLPORT_LIBRARY_DEBUG) diff --git a/code/nel/samples/misc/command/CMakeLists.txt b/code/nel/samples/misc/command/CMakeLists.txt index cffdbbff7..c60b4e63b 100644 --- a/code/nel/samples/misc/command/CMakeLists.txt +++ b/code/nel/samples/misc/command/CMakeLists.txt @@ -2,7 +2,7 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(nl_sample_command ${SRC}) -TARGET_LINK_LIBRARIES(nl_sample_command ${PLATFORM_LINKFLAGS} nelmisc) +TARGET_LINK_LIBRARIES(nl_sample_command nelmisc) NL_DEFAULT_PROPS(nl_sample_command "NeL, Samples, Misc: Commands") NL_ADD_RUNTIME_FLAGS(nl_sample_command) diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index 09ee80fe1..ca6f55635 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -16,7 +16,7 @@ SOURCE_GROUP(Traversals FILES ../../include/nel/3d/render_trav.h trav_scene.cpp ../../include/nel/3d/trav_scene.h) - + SOURCE_GROUP(Models FILES camera.cpp ../../include/nel/3d/camera.h @@ -50,7 +50,7 @@ SOURCE_GROUP(Models FILES ../../include/nel/3d/transform_shape.h water_model.cpp ../../include/nel/3d/water_model.h) - + SOURCE_GROUP(Landscape FILES bezier_patch.cpp ../../include/nel/3d/bezier_patch.h @@ -104,7 +104,7 @@ SOURCE_GROUP(Landscape FILES ../../include/nel/3d/tile_lumel.h zone.cpp ../../include/nel/3d/zone.h) - + SOURCE_GROUP(Landscape\\ZoneManager FILES zone_manager.cpp ../../include/nel/3d/zone_manager.h @@ -147,7 +147,7 @@ SOURCE_GROUP(Driver FILES ../../include/nel/3d/vertex_program.h vertex_program_parse.cpp ../../include/nel/3d/vertex_program_parse.h) - + SOURCE_GROUP(Font FILES computed_string.cpp ../../include/nel/3d/computed_string.h @@ -238,8 +238,8 @@ SOURCE_GROUP(Shapes FILES vertex_stream_manager.cpp ../../include/nel/3d/vertex_stream_manager.h water_shape.cpp - ../../include/nel/3d/water_shape.h) - + ../../include/nel/3d/water_shape.h) + SOURCE_GROUP(Textures FILES async_texture_block.cpp ../../include/nel/3d/async_texture_block.h @@ -275,7 +275,7 @@ SOURCE_GROUP(Textures FILES ../../include/nel/3d/texture_mem.h texture_multi_file.cpp ../../include/nel/3d/texture_multi_file.h) - + SOURCE_GROUP(Mrm FILES mrm_builder.cpp ../../include/nel/3d/mrm_builder.h @@ -285,7 +285,7 @@ SOURCE_GROUP(Mrm FILES ../../include/nel/3d/mrm_mesh.h mrm_parameters.cpp ../../include/nel/3d/mrm_parameters.h) - + SOURCE_GROUP(Animation FILES anim_ctrl.cpp ../../include/nel/3d/anim_detail_trav.h @@ -337,7 +337,7 @@ SOURCE_GROUP(Animation FILES ../../include/nel/3d/track_tcb.h transformable.cpp ../../include/nel/3d/transformable.h) - + SOURCE_GROUP(UserImp FILES animation_set_user.cpp ../../include/nel/3d/animation_set_user.h @@ -438,7 +438,7 @@ SOURCE_GROUP(User FILES ../../include/nel/3d/u_water.h ../../include/nel/3d/u_water_env_map.h ../../include/nel/3d/viewport.h) - + SOURCE_GROUP(Fx\\Particles FILES particle_system.cpp ../../include/nel/3d/particle_system.h @@ -457,7 +457,7 @@ SOURCE_GROUP(Fx\\Particles FILES ../../include/nel/3d/ps_spawn_info.h ps_util.cpp ../../include/nel/3d/ps_util.h) - + SOURCE_GROUP("Fx\\Particles\\particles render" FILES ps_dot.cpp ../../include/nel/3d/ps_dot.h @@ -543,7 +543,7 @@ SOURCE_GROUP(Fx\\2d FILES motion_blur.cpp ../../include/nel/3d/motion_blur.h quad_effect.cpp - ../../include/nel/3d/quad_effect.h) + ../../include/nel/3d/quad_effect.h) SOURCE_GROUP(Collisions FILES camera_col.cpp ../../include/nel/3d/camera_col.h @@ -667,6 +667,10 @@ NL_TARGET_LIB(nel3d ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nel3d ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY}) SET_TARGET_PROPERTIES(nel3d PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nel3d "NeL, Library: NeL 3D") diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 10fec6111..ea1a0ab31 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -14,6 +14,10 @@ NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC}) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_gl_LIBRARY}) NL_DEFAULT_PROPS(${NLDRV_OGL_LIB} "NeL, Driver, Video: OpenGL") NL_ADD_LIB_SUFFIX(${NLDRV_OGL_LIB}) @@ -28,7 +32,7 @@ ELSE(WIN32) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${COCOA}) ELSE(APPLE) - TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_LIB}) + TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_X11_LIB}) IF(XF86VidMode_FOUND) INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR}) ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS}) diff --git a/code/nel/src/georges/CMakeLists.txt b/code/nel/src/georges/CMakeLists.txt index d3c0199d7..28ef2ac61 100644 --- a/code/nel/src/georges/CMakeLists.txt +++ b/code/nel/src/georges/CMakeLists.txt @@ -7,6 +7,10 @@ NL_TARGET_LIB(nelgeorges ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelgeorges ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelgeorges ${LIBXML2_LIBRARIES} nelmisc) SET_TARGET_PROPERTIES(nelgeorges PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelgeorges "NeL, Library: NeL Georges") diff --git a/code/nel/src/ligo/CMakeLists.txt b/code/nel/src/ligo/CMakeLists.txt index f600637b7..8f517601e 100644 --- a/code/nel/src/ligo/CMakeLists.txt +++ b/code/nel/src/ligo/CMakeLists.txt @@ -5,6 +5,10 @@ NL_TARGET_LIB(nelligo ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelligo ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelligo ${LIBXML2_LIBRARIES} nelmisc) SET_TARGET_PROPERTIES(nelligo PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelligo "NeL, Library: NeL Ligo") diff --git a/code/nel/src/logic/CMakeLists.txt b/code/nel/src/logic/CMakeLists.txt index 107c57850..76e9aadbf 100644 --- a/code/nel/src/logic/CMakeLists.txt +++ b/code/nel/src/logic/CMakeLists.txt @@ -5,6 +5,10 @@ NL_TARGET_LIB(nellogic ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nellogic ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nellogic ${LIBXML2_LIBRARIES} nelmisc nelnet) SET_TARGET_PROPERTIES(nellogic PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nellogic "NeL, Library: NeL Logic") diff --git a/code/nel/src/net/CMakeLists.txt b/code/nel/src/net/CMakeLists.txt index ea68efe32..cc3c7c102 100644 --- a/code/nel/src/net/CMakeLists.txt +++ b/code/nel/src/net/CMakeLists.txt @@ -12,6 +12,10 @@ IF(WITH_GTK) ENDIF(GTK2_FOUND) ENDIF(WITH_GTK) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelnet ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelnet nelmisc) SET_TARGET_PROPERTIES(nelnet PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelnet "NeL, Library: NeL Net") diff --git a/code/nel/src/pacs/CMakeLists.txt b/code/nel/src/pacs/CMakeLists.txt index 0fa059d68..de531b8bb 100644 --- a/code/nel/src/pacs/CMakeLists.txt +++ b/code/nel/src/pacs/CMakeLists.txt @@ -5,6 +5,10 @@ NL_TARGET_LIB(nelpacs ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelpacs ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelpacs nelmisc) SET_TARGET_PROPERTIES(nelpacs PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelpacs "NeL, Library: NeL PACS") diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index 9497357ee..1c531a6d5 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -5,6 +5,10 @@ NL_TARGET_LIB(nelsound ${HEADERS} ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelsound ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelsound ${LIBXML2_LIBRARIES} nelmisc nelligo nelgeorges nel3d nelsnd_lowlevel) SET_TARGET_PROPERTIES(nelsound PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelsound "NeL, Library: NeL Sound") diff --git a/code/nel/src/sound/driver/CMakeLists.txt b/code/nel/src/sound/driver/CMakeLists.txt index c2ae80606..9f19bf5c6 100644 --- a/code/nel/src/sound/driver/CMakeLists.txt +++ b/code/nel/src/sound/driver/CMakeLists.txt @@ -12,6 +12,10 @@ IF(WITH_STATIC) TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${OGG_LIBRARY}) ENDIF(WITH_STATIC) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel") NL_ADD_RUNTIME_FLAGS(nelsnd_lowlevel) diff --git a/code/nel/src/sound/driver/openal/CMakeLists.txt b/code/nel/src/sound/driver/openal/CMakeLists.txt index 355dd12bf..626a5cf07 100644 --- a/code/nel/src/sound/driver/openal/CMakeLists.txt +++ b/code/nel/src/sound/driver/openal/CMakeLists.txt @@ -22,6 +22,10 @@ NL_TARGET_DRIVER(nel_drv_openal ${SRC}) INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nel_drv_openal ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(nel_drv_openal ${OPENAL_LIBRARY} nelmisc nelsnd_lowlevel) NL_DEFAULT_PROPS(nel_drv_openal "NeL, Driver, Sound: OpenAL") NL_ADD_RUNTIME_FLAGS(nel_drv_openal) diff --git a/code/nel/tools/misc/message_box_qt/CMakeLists.txt b/code/nel/tools/misc/message_box_qt/CMakeLists.txt index d2e05eac7..c93f024aa 100644 --- a/code/nel/tools/misc/message_box_qt/CMakeLists.txt +++ b/code/nel/tools/misc/message_box_qt/CMakeLists.txt @@ -9,7 +9,7 @@ SET( QT_USE_QTXML TRUE) ADD_EXECUTABLE(message_box_qt ${MESSAGE_BOX_SRC}) TARGET_LINK_LIBRARIES(message_box_qt ${QT_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) -NL_DEFAULT_PROPS(message_box_qt "Tools, Misc: Qt Message Box") +NL_DEFAULT_PROPS(message_box_qt "NeL, Tools, Misc: Qt Message Box") NL_ADD_RUNTIME_FLAGS(message_box_qt) ADD_DEFINITIONS(${QT_DEFINITIONS}) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index f8e7eef4b..2d07ba888 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -63,7 +63,7 @@ INCLUDE_DIRECTORIES( ${CURL_INCLUDE_DIRS} ) -TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS} +TARGET_LINK_LIBRARIES(ryzom_client nelmisc nelnet nelligo diff --git a/code/ryzom/common/src/game_share/CMakeLists.txt b/code/ryzom/common/src/game_share/CMakeLists.txt index 3862fe123..357423cd4 100644 --- a/code/ryzom/common/src/game_share/CMakeLists.txt +++ b/code/ryzom/common/src/game_share/CMakeLists.txt @@ -10,6 +10,11 @@ LIST(REMOVE_ITEM PRIV_H ${CMAKE_CURRENT_SOURCE_DIR}/enum_template.h) NL_TARGET_LIB(ryzom_gameshare ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(ryzom_gameshare ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(ryzom_gameshare nelmisc nelnet nelligo nelgeorges ${LIBXML2_LIBRARIES} ${ZLIB_LIBRARIES}) NL_DEFAULT_PROPS(ryzom_gameshare "Ryzom, Library: Game Share") NL_ADD_RUNTIME_FLAGS(ryzom_gameshare) diff --git a/code/ryzom/server/src/admin_modules/CMakeLists.txt b/code/ryzom/server/src/admin_modules/CMakeLists.txt index 7eb6af309..12a777c87 100644 --- a/code/ryzom/server/src/admin_modules/CMakeLists.txt +++ b/code/ryzom/server/src/admin_modules/CMakeLists.txt @@ -4,6 +4,10 @@ NL_TARGET_LIB(ryzom_adminmodules ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(ryzom_adminmodules ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(ryzom_adminmodules nelmisc nelnet) NL_DEFAULT_PROPS(ryzom_adminmodules "Ryzom, Library: Service Admin Modules") NL_ADD_RUNTIME_FLAGS(ryzom_adminmodules) diff --git a/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt b/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt index cf54655f7..62aa184ef 100644 --- a/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt +++ b/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt @@ -3,9 +3,14 @@ FILE(GLOB SRC *.cpp *.h) NL_TARGET_LIB(ryzom_gameplaymodule ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(ryzom_gameplaymodule nelmisc) +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(ryzom_gameplaymodule ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + +TARGET_LINK_LIBRARIES(ryzom_gameplaymodule nelmisc) NL_DEFAULT_PROPS(ryzom_gameplaymodule "Ryzom, Library: Gameplay Module") +NL_ADD_RUNTIME_FLAGS(ryzom_gameplaymodule) NL_ADD_LIB_SUFFIX(ryzom_gameplaymodule) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) diff --git a/code/ryzom/server/src/pd_lib/CMakeLists.txt b/code/ryzom/server/src/pd_lib/CMakeLists.txt index 44fd2791f..46974a9ae 100644 --- a/code/ryzom/server/src/pd_lib/CMakeLists.txt +++ b/code/ryzom/server/src/pd_lib/CMakeLists.txt @@ -9,7 +9,7 @@ NL_TARGET_LIB(ryzom_pd ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(ryzom_pd nelmisc nelnet) +TARGET_LINK_LIBRARIES(ryzom_pd nelmisc nelnet ryzom_gameshare) NL_DEFAULT_PROPS(ryzom_pd "Ryzom, Library: PD Lib") NL_ADD_RUNTIME_FLAGS(ryzom_pd) NL_ADD_LIB_SUFFIX(ryzom_pd)