diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 64e3e7275..5c5efc4a9 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -3,10 +3,10 @@ # Argument: name - the name of the .pc package, e.g. "nel-pacs.pc" ### MACRO(NL_GEN_PC name) - IF(NOT WIN32) + IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES) CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}") INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/pkgconfig) - ENDIF(NOT WIN32) + ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES) ENDMACRO(NL_GEN_PC) ### @@ -184,6 +184,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_EXTERNAL "With provided external." OFF) ENDIF(WIN32) OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) + OPTION(WITH_INSTALL_LIBRARIES "Install development files." ON ) ### # GUI toolkits @@ -211,7 +212,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_NEL "Build NeL (nearly always required)." ON ) OPTION(WITH_NELNS "Build NeL Network Services." OFF) OPTION(WITH_RYZOM "Build Ryzom Core." ON ) - OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) + OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) ENDMACRO(NL_SETUP_DEFAULT_OPTIONS) MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) @@ -327,18 +328,18 @@ MACRO(NL_SETUP_BUILD) SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-") # without inlining it's unusable, use custom optimizations again SET(MIN_OPTIMIZATIONS "/Od /Ob1") - ELSEIF(MSVC90) + ELSEIF(MSVC90) # don't use a /O[012x] flag if you want custom optimizations SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-") # without inlining it's unusable, use custom optimizations again SET(MIN_OPTIMIZATIONS "/Ob1") - ELSEIF(MSVC80) + ELSEIF(MSVC80) # don't use a /O[012x] flag if you want custom optimizations SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-") # without inlining it's unusable, use custom optimizations again SET(MIN_OPTIMIZATIONS "/Od /Ob1") - ELSE(MSVC10) - MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}") + ELSE(MSVC10) + MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}") ENDIF(MSVC10) SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /W3 /Zi /Zm1000 /MP /Gy-") @@ -480,43 +481,43 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS) IF(WIN32) SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations") ELSE(WIN32) - SET(RYZOM_ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/ryzom" CACHE PATH "Installation path for configurations") + SET(RYZOM_ETC_PREFIX "${RYZOM_PREFIX}/etc/ryzom" CACHE PATH "Installation path for configurations") ENDIF(WIN32) ENDIF(NOT RYZOM_ETC_PREFIX) ## Allow override of install_prefix/share path. IF(NOT RYZOM_SHARE_PREFIX) IF(WIN32) - SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.") - ELSE(WIN32) - SET(RYZOM_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/ryzom" CACHE PATH "Installation path for data.") - ENDIF(WIN32) + SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.") + ELSE(WIN32) + SET(RYZOM_SHARE_PREFIX "${RYZOM_PREFIX}/share/ryzom" CACHE PATH "Installation path for data.") + ENDIF(WIN32) ENDIF(NOT RYZOM_SHARE_PREFIX) ## Allow override of install_prefix/sbin path. IF(NOT RYZOM_SBIN_PREFIX) - IF(WIN32) - SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") - ELSE(WIN32) - SET(RYZOM_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.") - ENDIF(WIN32) + IF(WIN32) + SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") + ELSE(WIN32) + SET(RYZOM_SBIN_PREFIX "${RYZOM_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.") + ENDIF(WIN32) ENDIF(NOT RYZOM_SBIN_PREFIX) ## Allow override of install_prefix/bin path. IF(NOT RYZOM_BIN_PREFIX) IF(WIN32) - SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") + SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") ELSE(WIN32) - SET(RYZOM_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for tools.") + SET(RYZOM_BIN_PREFIX "${RYZOM_PREFIX}/bin" CACHE PATH "Installation path for tools.") ENDIF(WIN32) ENDIF(NOT RYZOM_BIN_PREFIX) ## Allow override of install_prefix/games path. IF(NOT RYZOM_GAMES_PREFIX) IF(WIN32) - SET(RYZOM_GAMES_PREFIX "." CACHE PATH "Installation path for tools and applications.") + SET(RYZOM_GAMES_PREFIX "." CACHE PATH "Installation path for tools and applications.") ELSE(WIN32) - SET(RYZOM_GAMES_PREFIX "${CMAKE_INSTALL_PREFIX}/games" CACHE PATH "Installation path for client.") + SET(RYZOM_GAMES_PREFIX "${RYZOM_PREFIX}/games" CACHE PATH "Installation path for client.") ENDIF(WIN32) ENDIF(NOT RYZOM_GAMES_PREFIX) diff --git a/code/nel/CMakeLists.txt b/code/nel/CMakeLists.txt index ead484a2d..57f7edd44 100644 --- a/code/nel/CMakeLists.txt +++ b/code/nel/CMakeLists.txt @@ -54,24 +54,27 @@ IF(WITH_GTK) FIND_PACKAGE(GTK2) ENDIF(WITH_GTK) -IF(UNIX) - SET(prefix ${CMAKE_INSTALL_PREFIX}) - SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) - SET(libdir ${CMAKE_INSTALL_PREFIX}/lib) - SET(includedir ${CMAKE_INSTALL_PREFIX}/include) - SET(enable_ligo ${WITH_LIGO}) - SET(enable_logic ${WITH_LOGIC}) - SET(enable_georges ${WITH_GEORGES}) - SET(enable_net ${WITH_NET}) - SET(enable_3d ${WITH_3D}) - SET(enable_pacs ${WITH_PACS}) - SET(enable_sound ${WITH_SOUND}) - CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config) - - INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION bin) -ENDIF(UNIX) - -ADD_SUBDIRECTORY(include) +IF(WITH_INSTALL_LIBRARIES) + IF(UNIX) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) + SET(libdir ${CMAKE_INSTALL_PREFIX}/lib) + SET(includedir ${CMAKE_INSTALL_PREFIX}/include) + SET(enable_ligo ${WITH_LIGO}) + SET(enable_logic ${WITH_LOGIC}) + SET(enable_georges ${WITH_GEORGES}) + SET(enable_net ${WITH_NET}) + SET(enable_3d ${WITH_3D}) + SET(enable_pacs ${WITH_PACS}) + SET(enable_sound ${WITH_SOUND}) + CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config) + + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION bin) + ENDIF(UNIX) + + ADD_SUBDIRECTORY(include) +ENDIF(WITH_INSTALL_LIBRARIES) + ADD_SUBDIRECTORY(src) IF(WITH_NEL_SAMPLES) diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index 3888be211..45b38fcbd 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -706,6 +706,9 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-3d.pc) -INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) ADD_SUBDIRECTORY(driver) diff --git a/code/nel/src/3d/driver/direct3d/CMakeLists.txt b/code/nel/src/3d/driver/direct3d/CMakeLists.txt index 5011c3c45..cc61fa9bd 100644 --- a/code/nel/src/3d/driver/direct3d/CMakeLists.txt +++ b/code/nel/src/3d/driver/direct3d/CMakeLists.txt @@ -16,7 +16,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 6fdecab71..d90c7e0b3 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -61,7 +61,9 @@ IF(NOT APPLE AND WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp) ENDIF(NOT APPLE AND WITH_PCH) -INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/nel/src/cegui/CMakeLists.txt b/code/nel/src/cegui/CMakeLists.txt index 99fcfedf3..342e08780 100644 --- a/code/nel/src/cegui/CMakeLists.txt +++ b/code/nel/src/cegui/CMakeLists.txt @@ -11,4 +11,6 @@ NL_ADD_LIB_SUFFIX(nelceguirenderer) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_CEGUIRENDERER_EXPORTS) -INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/georges/CMakeLists.txt b/code/nel/src/georges/CMakeLists.txt index d3c0199d7..6954bb87b 100644 --- a/code/nel/src/georges/CMakeLists.txt +++ b/code/nel/src/georges/CMakeLists.txt @@ -21,4 +21,7 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-georges.pc) -INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/ligo/CMakeLists.txt b/code/nel/src/ligo/CMakeLists.txt index f600637b7..4d8d49f3d 100644 --- a/code/nel/src/ligo/CMakeLists.txt +++ b/code/nel/src/ligo/CMakeLists.txt @@ -19,4 +19,7 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-ligo.pc) -INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/logic/CMakeLists.txt b/code/nel/src/logic/CMakeLists.txt index 107c57850..c84e8d18e 100644 --- a/code/nel/src/logic/CMakeLists.txt +++ b/code/nel/src/logic/CMakeLists.txt @@ -14,4 +14,6 @@ NL_ADD_LIB_SUFFIX(nellogic) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) -INSTALL(TARGETS nellogic LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nellogic LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/misc/CMakeLists.txt b/code/nel/src/misc/CMakeLists.txt index 1710e5b6b..38d291552 100644 --- a/code/nel/src/misc/CMakeLists.txt +++ b/code/nel/src/misc/CMakeLists.txt @@ -53,4 +53,7 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-misc.pc) -INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/net/CMakeLists.txt b/code/nel/src/net/CMakeLists.txt index ea68efe32..c24a94215 100644 --- a/code/nel/src/net/CMakeLists.txt +++ b/code/nel/src/net/CMakeLists.txt @@ -24,4 +24,7 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-net.pc) -INSTALL(TARGETS nelnet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelnet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/pacs/CMakeLists.txt b/code/nel/src/pacs/CMakeLists.txt index 0fa059d68..62a809407 100644 --- a/code/nel/src/pacs/CMakeLists.txt +++ b/code/nel/src/pacs/CMakeLists.txt @@ -19,4 +19,7 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-pacs.pc) -INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/sound/CMakeLists.txt b/code/nel/src/sound/CMakeLists.txt index 9497357ee..21c1de1f8 100644 --- a/code/nel/src/sound/CMakeLists.txt +++ b/code/nel/src/sound/CMakeLists.txt @@ -19,6 +19,9 @@ IF(WITH_PCH) ENDIF(WITH_PCH) NL_GEN_PC(nel-sound.pc) -INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) ADD_SUBDIRECTORY(driver) diff --git a/code/nel/src/sound/driver/CMakeLists.txt b/code/nel/src/sound/driver/CMakeLists.txt index c2ae80606..1a8391c41 100644 --- a/code/nel/src/sound/driver/CMakeLists.txt +++ b/code/nel/src/sound/driver/CMakeLists.txt @@ -23,7 +23,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nelsnd_lowlevel ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound_lowlevel.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) IF(WITH_DRIVER_OPENAL) ADD_SUBDIRECTORY(openal) diff --git a/code/nel/src/sound/driver/dsound/CMakeLists.txt b/code/nel/src/sound/driver/dsound/CMakeLists.txt index f2d13d785..c2fc934dc 100644 --- a/code/nel/src/sound/driver/dsound/CMakeLists.txt +++ b/code/nel/src/sound/driver/dsound/CMakeLists.txt @@ -13,7 +13,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound_win ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/nel/src/sound/driver/fmod/CMakeLists.txt b/code/nel/src/sound/driver/fmod/CMakeLists.txt index 049d8b627..e641a9277 100644 --- a/code/nel/src/sound/driver/fmod/CMakeLists.txt +++ b/code/nel/src/sound/driver/fmod/CMakeLists.txt @@ -13,7 +13,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod_win ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/nel/src/sound/driver/openal/CMakeLists.txt b/code/nel/src/sound/driver/openal/CMakeLists.txt index 53b0c8c2a..47ce5b24f 100644 --- a/code/nel/src/sound/driver/openal/CMakeLists.txt +++ b/code/nel/src/sound/driver/openal/CMakeLists.txt @@ -44,7 +44,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/nel/src/sound/driver/xaudio2/CMakeLists.txt b/code/nel/src/sound/driver/xaudio2/CMakeLists.txt index 5e45a9809..eb342a4df 100644 --- a/code/nel/src/sound/driver/xaudio2/CMakeLists.txt +++ b/code/nel/src/sound/driver/xaudio2/CMakeLists.txt @@ -40,7 +40,9 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2_win ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) -IF(WITH_MAXPLUGIN) - INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) -ENDIF(WITH_MAXPLUGIN) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) + INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION bin LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib COMPONENT driverssound) + IF(WITH_MAXPLUGIN) + INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) + ENDIF(WITH_MAXPLUGIN) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) diff --git a/code/ryzom/client/CMakeLists.txt b/code/ryzom/client/CMakeLists.txt index db2ffce2a..36090be7b 100644 --- a/code/ryzom/client/CMakeLists.txt +++ b/code/ryzom/client/CMakeLists.txt @@ -1,6 +1,6 @@ ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(data) -ADD_SUBDIRECTORY(patcher) +#ADD_SUBDIRECTORY(data) +#ADD_SUBDIRECTORY(patcher) IF(UNIX AND NOT APPLE) ADD_SUBDIRECTORY(unix) diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 84ea6a369..3971fb98f 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -94,12 +94,12 @@ TARGET_LINK_LIBRARIES(ryzom_client ) IF(NOT APPLE AND NOT WIN32) - TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES}) + TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES}) ENDIF(NOT APPLE AND NOT WIN32) IF(APPLE) - FIND_LIBRARY(FOUNDATION_LIBRARY Foundation) - TARGET_LINK_LIBRARIES(ryzom_client ${FOUNDATION_LIBRARY}) + FIND_LIBRARY(FOUNDATION_LIBRARY Foundation) + TARGET_LINK_LIBRARIES(ryzom_client ${FOUNDATION_LIBRARY}) ENDIF(APPLE) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ${LUABIND_DEFINITIONS}) @@ -113,4 +113,4 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ryzom_client RUNTIME DESTINATION games COMPONENT client BUNDLE DESTINATION /Applications) +INSTALL(TARGETS ryzom_client RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications) diff --git a/code/ryzom/client/src/client_sheets/CMakeLists.txt b/code/ryzom/client/src/client_sheets/CMakeLists.txt index cc02e3c64..4f21ecf9d 100644 --- a/code/ryzom/client/src/client_sheets/CMakeLists.txt +++ b/code/ryzom/client/src/client_sheets/CMakeLists.txt @@ -13,4 +13,6 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_clientsheets ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ryzom_clientsheets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS ryzom_clientsheets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/ryzom/client/src/seven_zip/CMakeLists.txt b/code/ryzom/client/src/seven_zip/CMakeLists.txt index 80bd946a6..85212084e 100644 --- a/code/ryzom/client/src/seven_zip/CMakeLists.txt +++ b/code/ryzom/client/src/seven_zip/CMakeLists.txt @@ -19,5 +19,7 @@ NL_ADD_LIB_SUFFIX(ryzom_sevenzip) ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) -INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) -INSTALL(TARGETS 7zDec RUNTIME DESTINATION bin COMPONENT client) +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) + INSTALL(TARGETS 7zDec RUNTIME DESTINATION bin COMPONENT client) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/ryzom/common/src/game_share/CMakeLists.txt b/code/ryzom/common/src/game_share/CMakeLists.txt index 7883ce03d..6342f468d 100644 --- a/code/ryzom/common/src/game_share/CMakeLists.txt +++ b/code/ryzom/common/src/game_share/CMakeLists.txt @@ -22,5 +22,6 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_gameshare ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ryzom_gameshare LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) - +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS ryzom_gameshare LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)