From 2c8f81953aaa7e9a49c95a0d638bab26d7282f15 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Sep 2010 13:51:44 +0200 Subject: [PATCH] Added: NL_ADD_RUNTIME_FLAGS for libraries --- code/nel/src/3d/CMakeLists.txt | 1 + code/nel/src/3d/driver/direct3d/CMakeLists.txt | 2 +- code/nel/src/cegui/CMakeLists.txt | 18 ++++-------------- code/nel/src/georges/CMakeLists.txt | 1 + code/nel/src/ligo/CMakeLists.txt | 1 + code/nel/src/logic/CMakeLists.txt | 1 + code/nel/src/net/CMakeLists.txt | 1 + code/nel/src/pacs/CMakeLists.txt | 1 + code/nel/src/sound/CMakeLists.txt | 1 + code/nel/src/sound/driver/CMakeLists.txt | 1 + .../nel/src/sound/driver/dsound/CMakeLists.txt | 2 +- code/nel/src/sound/driver/fmod/CMakeLists.txt | 2 +- .../nel/src/sound/driver/openal/CMakeLists.txt | 3 ++- .../src/sound/driver/xaudio2/CMakeLists.txt | 3 ++- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index 766dd94f2..60a776fd7 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -669,6 +669,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY}) SET_TARGET_PROPERTIES(nel3d PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nel3d "NeL, Library: NeL 3D") +NL_ADD_RUNTIME_FLAGS(nel3d) NL_ADD_STATIC_VID_DRIVERS(nel3d) NL_ADD_LIB_SUFFIX(nel3d) diff --git a/code/nel/src/3d/driver/direct3d/CMakeLists.txt b/code/nel/src/3d/driver/direct3d/CMakeLists.txt index 1ee6ad3f8..5011c3c45 100644 --- a/code/nel/src/3d/driver/direct3d/CMakeLists.txt +++ b/code/nel/src/3d/driver/direct3d/CMakeLists.txt @@ -4,7 +4,7 @@ NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC}) INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) +TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D") NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win) diff --git a/code/nel/src/cegui/CMakeLists.txt b/code/nel/src/cegui/CMakeLists.txt index 571a117fb..a85381022 100644 --- a/code/nel/src/cegui/CMakeLists.txt +++ b/code/nel/src/cegui/CMakeLists.txt @@ -4,20 +4,10 @@ ADD_LIBRARY(nelceguirenderer SHARED ${SRC} nelceguirenderer.def) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${CEGUI_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(nelceguirenderer nelmisc nel3d ${CEGUI_LIBRARY}) -SET_TARGET_PROPERTIES(nelceguirenderer PROPERTIES - VERSION ${NL_VERSION} - SOVERSION ${NL_VERSION_MAJOR} - PROJECT_LABEL "NeL, Library: CEGUI Renderer") +NL_DEFAULT_PROPS(nelceguirenderer "NeL, Library: CEGUI Renderer") +NL_ADD_RUNTIME_FLAGS(nelceguirenderer) +NL_ADD_LIB_SUFFIX(nelceguirenderer) -IF(WIN32) - SET_TARGET_PROPERTIES(nelceguirenderer PROPERTIES - DEBUG_POSTFIX "_d" - RELEASE_POSTFIX "_r" - LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}" - LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}") - ADD_DEFINITIONS("/DNEL_CEGUIRENDERER_EXPORTS") -ENDIF(WIN32) - -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_CEGUIRENDERER_EXPORTS) INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/nel/src/georges/CMakeLists.txt b/code/nel/src/georges/CMakeLists.txt index 491d0dfaf..42addf38d 100644 --- a/code/nel/src/georges/CMakeLists.txt +++ b/code/nel/src/georges/CMakeLists.txt @@ -11,6 +11,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelgeorges ${LIBXML2_LIBRARIES} nelmisc) SET_TARGET_PROPERTIES(nelgeorges PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelgeorges "NeL, Library: NeL Georges") +NL_ADD_RUNTIME_FLAGS(nelgeorges) NL_ADD_LIB_SUFFIX(nelgeorges) diff --git a/code/nel/src/ligo/CMakeLists.txt b/code/nel/src/ligo/CMakeLists.txt index 18545a622..37004ab4a 100644 --- a/code/nel/src/ligo/CMakeLists.txt +++ b/code/nel/src/ligo/CMakeLists.txt @@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelligo ${LIBXML2_LIBRARIES} nelmisc) SET_TARGET_PROPERTIES(nelligo PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelligo "NeL, Library: NeL Ligo") +NL_ADD_RUNTIME_FLAGS(nelligo) NL_ADD_LIB_SUFFIX(nelligo) diff --git a/code/nel/src/logic/CMakeLists.txt b/code/nel/src/logic/CMakeLists.txt index bbe65727b..d426a4948 100644 --- a/code/nel/src/logic/CMakeLists.txt +++ b/code/nel/src/logic/CMakeLists.txt @@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nellogic ${LIBXML2_LIBRARIES} nelmisc nelnet) SET_TARGET_PROPERTIES(nellogic PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nellogic "NeL, Library: NeL Logic") +NL_ADD_RUNTIME_FLAGS(nellogic) NL_ADD_LIB_SUFFIX(nellogic) diff --git a/code/nel/src/net/CMakeLists.txt b/code/nel/src/net/CMakeLists.txt index 4fc36c833..65c2ab2ac 100644 --- a/code/nel/src/net/CMakeLists.txt +++ b/code/nel/src/net/CMakeLists.txt @@ -14,6 +14,7 @@ ENDIF(WITH_GTK) TARGET_LINK_LIBRARIES(nelnet nelmisc) SET_TARGET_PROPERTIES(nelnet PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelnet "NeL, Library: NeL Net") +NL_ADD_RUNTIME_FLAGS(nelnet) NL_ADD_LIB_SUFFIX(nelnet) diff --git a/code/nel/src/pacs/CMakeLists.txt b/code/nel/src/pacs/CMakeLists.txt index 3fc35de1b..549a3e8dd 100644 --- a/code/nel/src/pacs/CMakeLists.txt +++ b/code/nel/src/pacs/CMakeLists.txt @@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelpacs nelmisc) SET_TARGET_PROPERTIES(nelpacs PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelpacs "NeL, Library: NeL PACS") +NL_ADD_RUNTIME_FLAGS(nelpacs) NL_ADD_LIB_SUFFIX(nelpacs) diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index 61187125b..800a94634 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -7,6 +7,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) 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") +NL_ADD_RUNTIME_FLAGS(nelsound) NL_ADD_LIB_SUFFIX(nelsound) diff --git a/code/nel/src/sound/driver/CMakeLists.txt b/code/nel/src/sound/driver/CMakeLists.txt index d34989d5a..8969489a8 100644 --- a/code/nel/src/sound/driver/CMakeLists.txt +++ b/code/nel/src/sound/driver/CMakeLists.txt @@ -12,6 +12,7 @@ INCLUDE_DIRECTORIES(${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES LINK_INTERFACE_LIBRARIES "") NL_DEFAULT_PROPS(nelsnd_lowlevel "NeL, Library: Sound Lowlevel") +NL_ADD_RUNTIME_FLAGS(nelsnd_lowlevel) NL_ADD_STATIC_VID_DRIVERS(nelsnd_lowlevel) NL_ADD_LIB_SUFFIX(nelsnd_lowlevel) diff --git a/code/nel/src/sound/driver/dsound/CMakeLists.txt b/code/nel/src/sound/driver/dsound/CMakeLists.txt index e64e0c1d7..aeef35c8b 100644 --- a/code/nel/src/sound/driver/dsound/CMakeLists.txt +++ b/code/nel/src/sound/driver/dsound/CMakeLists.txt @@ -6,8 +6,8 @@ INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nel_drv_dsound nelmisc nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY}) NL_DEFAULT_PROPS(nel_drv_dsound "NeL, Driver, Sound: DirectSound") -NL_ADD_LIB_SUFFIX(nel_drv_dsound) NL_ADD_RUNTIME_FLAGS(nel_drv_dsound) +NL_ADD_LIB_SUFFIX(nel_drv_dsound) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp) diff --git a/code/nel/src/sound/driver/fmod/CMakeLists.txt b/code/nel/src/sound/driver/fmod/CMakeLists.txt index 54f46aec1..616b62300 100644 --- a/code/nel/src/sound/driver/fmod/CMakeLists.txt +++ b/code/nel/src/sound/driver/fmod/CMakeLists.txt @@ -6,8 +6,8 @@ INCLUDE_DIRECTORIES(${FMOD_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nel_drv_fmod ${FMOD_LIBRARY} nelmisc nelsnd_lowlevel) NL_DEFAULT_PROPS(nel_drv_fmod "NeL, Driver, Sound: FMOD") -NL_ADD_LIB_SUFFIX(nel_drv_fmod) NL_ADD_RUNTIME_FLAGS(nel_drv_fmod) +NL_ADD_LIB_SUFFIX(nel_drv_fmod) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp) diff --git a/code/nel/src/sound/driver/openal/CMakeLists.txt b/code/nel/src/sound/driver/openal/CMakeLists.txt index bf8c0e742..355dd12bf 100644 --- a/code/nel/src/sound/driver/openal/CMakeLists.txt +++ b/code/nel/src/sound/driver/openal/CMakeLists.txt @@ -21,10 +21,11 @@ SOURCE_GROUP(util FILES NL_TARGET_DRIVER(nel_drv_openal ${SRC}) INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR}) + TARGET_LINK_LIBRARIES(nel_drv_openal ${OPENAL_LIBRARY} nelmisc nelsnd_lowlevel) NL_DEFAULT_PROPS(nel_drv_openal "NeL, Driver, Sound: OpenAL") -NL_ADD_LIB_SUFFIX(nel_drv_openal) NL_ADD_RUNTIME_FLAGS(nel_drv_openal) +NL_ADD_LIB_SUFFIX(nel_drv_openal) IF(WIN32) # Find and include EFX-Util on Windows. diff --git a/code/nel/src/sound/driver/xaudio2/CMakeLists.txt b/code/nel/src/sound/driver/xaudio2/CMakeLists.txt index 3f69d2c42..431d336dd 100644 --- a/code/nel/src/sound/driver/xaudio2/CMakeLists.txt +++ b/code/nel/src/sound/driver/xaudio2/CMakeLists.txt @@ -29,11 +29,12 @@ SOURCE_GROUP(efx FILES NL_TARGET_DRIVER(nel_drv_xaudio2 ${SRC}) INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) + TARGET_LINK_LIBRARIES(nel_drv_xaudio2 nelmisc nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY}) NL_DEFAULT_PROPS(nel_drv_xaudio2 "NeL, Driver, Sound: XAudio2") -NL_ADD_LIB_SUFFIX(nel_drv_xaudio2) NL_ADD_RUNTIME_FLAGS(nel_drv_xaudio2) +NL_ADD_LIB_SUFFIX(nel_drv_xaudio2) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2 ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp)