Changed: Simplified CMake ELSE and ENDIF

This commit is contained in:
kervala 2015-11-29 14:06:05 +01:00
parent b99cb6820f
commit a9c261c142
10 changed files with 76 additions and 76 deletions

View file

@ -4,34 +4,34 @@ MACRO(NL_CONFIGURE_CHECKS)
# 3D drivers # 3D drivers
IF(WITH_DRIVER_OPENGL) IF(WITH_DRIVER_OPENGL)
SET(NL_OPENGL_AVAILABLE 1) SET(NL_OPENGL_AVAILABLE 1)
ENDIF(WITH_DRIVER_OPENGL) ENDIF()
IF(WITH_DRIVER_OPENGLES) IF(WITH_DRIVER_OPENGLES)
SET(NL_OPENGLES_AVAILABLE 1) SET(NL_OPENGLES_AVAILABLE 1)
ENDIF(WITH_DRIVER_OPENGLES) ENDIF()
IF(WITH_DRIVER_DIRECT3D) IF(WITH_DRIVER_DIRECT3D)
SET(NL_DIRECT3D_AVAILABLE 1) SET(NL_DIRECT3D_AVAILABLE 1)
ENDIF(WITH_DRIVER_DIRECT3D) ENDIF()
# sound drivers # sound drivers
IF(WITH_DRIVER_FMOD) IF(WITH_DRIVER_FMOD)
SET(NL_FMOD_AVAILABLE 1) SET(NL_FMOD_AVAILABLE 1)
ENDIF(WITH_DRIVER_FMOD) ENDIF()
IF(WITH_DRIVER_OPENAL) IF(WITH_DRIVER_OPENAL)
SET(NL_OPENAL_AVAILABLE 1) SET(NL_OPENAL_AVAILABLE 1)
ENDIF(WITH_DRIVER_OPENAL) ENDIF()
IF(WITH_DRIVER_DSOUND) IF(WITH_DRIVER_DSOUND)
SET(NL_DSOUND_AVAILABLE 1) SET(NL_DSOUND_AVAILABLE 1)
ENDIF(WITH_DRIVER_DSOUND) ENDIF()
IF(WITH_DRIVER_XAUDIO2) IF(WITH_DRIVER_XAUDIO2)
SET(NL_XAUDIO2_AVAILABLE 1) SET(NL_XAUDIO2_AVAILABLE 1)
ENDIF(WITH_DRIVER_XAUDIO2) ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
ADD_DEFINITIONS(-DHAVE_CONFIG_H) ADD_DEFINITIONS(-DHAVE_CONFIG_H)
ENDMACRO(NL_CONFIGURE_CHECKS) ENDMACRO()

View file

@ -7,7 +7,7 @@ IF(SOURCE_DIR)
# Replace spaces by semi-columns # Replace spaces by semi-columns
IF(CMAKE_MODULE_PATH) IF(CMAKE_MODULE_PATH)
STRING(REPLACE " " ";" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) STRING(REPLACE " " ";" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
ENDIF(CMAKE_MODULE_PATH) ENDIF()
SET(CMAKE_MODULE_PATH ${SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH}) SET(CMAKE_MODULE_PATH ${SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH})
@ -36,7 +36,7 @@ MACRO(NOW RESULT)
MESSAGE(SEND_ERROR "date not implemented") MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} "0000-00-00 00:00:00") SET(${RESULT} "0000-00-00 00:00:00")
ENDIF() ENDIF()
ENDMACRO(NOW) ENDMACRO()
IF(EXISTS "${ROOT_DIR}/.svn/") IF(EXISTS "${ROOT_DIR}/.svn/")
FIND_PACKAGE(Subversion QUIET) FIND_PACKAGE(Subversion QUIET)
@ -44,14 +44,14 @@ IF(EXISTS "${ROOT_DIR}/.svn/")
IF(SUBVERSION_FOUND) IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${ROOT_DIR} ER) Subversion_WC_INFO(${ROOT_DIR} ER)
SET(REVISION ${ER_WC_REVISION}) SET(REVISION ${ER_WC_REVISION})
ENDIF(SUBVERSION_FOUND) ENDIF()
FIND_PACKAGE(TortoiseSVN QUIET) FIND_PACKAGE(TortoiseSVN QUIET)
IF(TORTOISESVN_FOUND) IF(TORTOISESVN_FOUND)
TORTOISESVN_GET_REVISION(${ROOT_DIR} REVISION) TORTOISESVN_GET_REVISION(${ROOT_DIR} REVISION)
ENDIF(TORTOISESVN_FOUND) ENDIF()
ENDIF(EXISTS "${ROOT_DIR}/.svn/") ENDIF()
IF(EXISTS "${ROOT_DIR}/.hg/") IF(EXISTS "${ROOT_DIR}/.hg/")
FIND_PACKAGE(Mercurial) FIND_PACKAGE(Mercurial)

View file

@ -14,11 +14,11 @@ ADD_DEFINITIONS(-DRIVER_DIRECT3D_EXPORTS)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) 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 ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d) INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d) INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -4,11 +4,11 @@ IF(NOT WIN32)
IF(APPLE) IF(APPLE)
FIND_LIBRARY(CARBON NAMES Carbon) FIND_LIBRARY(CARBON NAMES Carbon)
FIND_LIBRARY(COCOA NAMES Cocoa) FIND_LIBRARY(COCOA NAMES Cocoa)
ELSE(APPLE) ELSE()
FIND_PACKAGE(X11) FIND_PACKAGE(X11)
FIND_PACKAGE(XF86VidMode) FIND_PACKAGE(XF86VidMode)
ENDIF(APPLE) ENDIF()
ENDIF(NOT WIN32) ENDIF()
FILE(GLOB SRC *.cpp *.h *.def) FILE(GLOB SRC *.cpp *.h *.def)
@ -17,13 +17,13 @@ IF(APPLE)
SET(SRC ${SRC} ${MAC_SRC}) SET(SRC ${SRC} ${MAC_SRC})
SET_SOURCE_FILES_PROPERTIES(${SRC} SET_SOURCE_FILES_PROPERTIES(${SRC}
PROPERTIES COMPILE_FLAGS "-x objective-c++") PROPERTIES COMPILE_FLAGS "-x objective-c++")
ENDIF(APPLE) ENDIF()
IF(WIN32) IF(WIN32)
SET(NLDRV_OGL_LIB "nel_drv_opengl_win") SET(NLDRV_OGL_LIB "nel_drv_opengl_win")
ELSE(WIN32) ELSE()
SET(NLDRV_OGL_LIB "nel_drv_opengl") SET(NLDRV_OGL_LIB "nel_drv_opengl")
ENDIF(WIN32) ENDIF()
NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC}) NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC})
@ -38,12 +38,12 @@ IF(WIN32)
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS) ADD_DEFINITIONS(-DDRIVER_OPENGL_EXPORTS)
ENDIF(WIN32) ENDIF()
IF(APPLE) IF(APPLE)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${CARBON})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${COCOA}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${COCOA})
ENDIF(APPLE) ENDIF()
IF(UNIX AND NOT APPLE) IF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_X11_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_X11_LIB})
@ -51,41 +51,41 @@ IF(UNIX AND NOT APPLE)
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS}) ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XF86VidMode_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XF86VidMode_LIBRARY})
ENDIF(XF86VidMode_FOUND) ENDIF()
IF(X11_Xrandr_FOUND) IF(X11_Xrandr_FOUND)
INCLUDE_DIRECTORIES(${X11_Xrandr_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xrandr_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XRANDR) ADD_DEFINITIONS(-DHAVE_XRANDR)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrandr_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrandr_LIB})
ENDIF(X11_Xrandr_FOUND) ENDIF()
IF(X11_Xrender_FOUND) IF(X11_Xrender_FOUND)
INCLUDE_DIRECTORIES(${X11_Xrender_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xrender_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XRENDER) ADD_DEFINITIONS(-DHAVE_XRENDER)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrender_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xrender_LIB})
ENDIF(X11_Xrender_FOUND) ENDIF()
IF(X11_Xcursor_FOUND) IF(X11_Xcursor_FOUND)
INCLUDE_DIRECTORIES(${X11_Xcursor_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xcursor_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XCURSOR) ADD_DEFINITIONS(-DHAVE_XCURSOR)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xcursor_LIB})
ENDIF(X11_Xcursor_FOUND) ENDIF()
IF(X11_Xext_FOUND) IF(X11_Xext_FOUND)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${X11_Xext_LIB})
ENDIF(X11_Xext_FOUND) ENDIF()
# libraries needed to be linked while linking to static X11 libraries # libraries needed to be linked while linking to static X11 libraries
FIND_LIBRARY(XCB_LIBRARY FIND_LIBRARY(XCB_LIBRARY
NAMES xcb NAMES xcb
HINTS ${X11_LIB_SEARCH_PATH}) HINTS ${X11_LIB_SEARCH_PATH})
IF(XCB_LIBRARY) IF(XCB_LIBRARY)
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} ${XCB_LIBRARY})
ENDIF(XCB_LIBRARY) ENDIF()
ENDIF(UNIX AND NOT APPLE) ENDIF()
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) 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 ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d) INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d) INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -4,11 +4,11 @@ IF(NOT WIN32)
IF(APPLE) IF(APPLE)
FIND_LIBRARY(CARBON NAMES Carbon) FIND_LIBRARY(CARBON NAMES Carbon)
FIND_LIBRARY(COCOA NAMES Cocoa) FIND_LIBRARY(COCOA NAMES Cocoa)
ELSE(APPLE) ELSE()
FIND_PACKAGE(X11) FIND_PACKAGE(X11)
FIND_PACKAGE(XF86VidMode) FIND_PACKAGE(XF86VidMode)
ENDIF(APPLE) ENDIF()
ENDIF(NOT WIN32) ENDIF()
SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}/nel/src/3d/driver/opengl) SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}/nel/src/3d/driver/opengl)
@ -18,7 +18,7 @@ IF(APPLE)
FILE(GLOB MAC_SRC ${SOURCE_DIR}/mac/*.h ${SOURCE_DIR}/mac/*.m ${SOURCE_DIR}/mac/*.mm ${SOURCE_DIR}/mac/*.cpp) FILE(GLOB MAC_SRC ${SOURCE_DIR}/mac/*.h ${SOURCE_DIR}/mac/*.m ${SOURCE_DIR}/mac/*.mm ${SOURCE_DIR}/mac/*.cpp)
SET(SRC ${SRC} ${MAC_SRC}) SET(SRC ${SRC} ${MAC_SRC})
SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS "-x objective-c++") SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS "-x objective-c++")
ENDIF(APPLE) ENDIF()
INCLUDE_DIRECTORIES(${SOURCE_DIR} ${OPENGLES_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${SOURCE_DIR} ${OPENGLES_INCLUDE_DIR})
@ -26,9 +26,9 @@ ADD_DEFINITIONS(-DUSE_OPENGLES)
IF(WIN32) IF(WIN32)
SET(NLDRV_OGLES_LIB "nel_drv_opengles_win") SET(NLDRV_OGLES_LIB "nel_drv_opengles_win")
ELSE(WIN32) ELSE()
SET(NLDRV_OGLES_LIB "nel_drv_opengles") SET(NLDRV_OGLES_LIB "nel_drv_opengles")
ENDIF(WIN32) ENDIF()
NL_TARGET_DRIVER(${NLDRV_OGLES_LIB} ${SRC}) NL_TARGET_DRIVER(${NLDRV_OGLES_LIB} ${SRC})
@ -41,12 +41,12 @@ IF(WIN32)
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS) ADD_DEFINITIONS(/DDRIVER_OPENGLES_EXPORTS)
ENDIF(WIN32) ENDIF()
IF(APPLE) IF(APPLE)
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${CARBON}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${CARBON})
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${COCOA}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${COCOA})
ENDIF(APPLE) ENDIF()
IF(UNIX AND NOT APPLE) IF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_X11_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_X11_LIB})
@ -54,31 +54,31 @@ IF(UNIX AND NOT APPLE)
INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${XF86VidMode_INCLUDE_DIR})
ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS}) ADD_DEFINITIONS(${XF86VidMode_DEFINITIONS})
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${XF86VidMode_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${XF86VidMode_LIBRARY})
ENDIF(XF86VidMode_FOUND) ENDIF()
IF(X11_Xrandr_FOUND) IF(X11_Xrandr_FOUND)
INCLUDE_DIRECTORIES(${X11_Xrandr_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xrandr_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XRANDR) ADD_DEFINITIONS(-DHAVE_XRANDR)
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xrandr_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xrandr_LIB})
ENDIF(X11_Xrandr_FOUND) ENDIF()
IF(X11_Xrender_FOUND) IF(X11_Xrender_FOUND)
INCLUDE_DIRECTORIES(${X11_Xrender_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xrender_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XRENDER) ADD_DEFINITIONS(-DHAVE_XRENDER)
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xrender_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xrender_LIB})
ENDIF(X11_Xrender_FOUND) ENDIF()
IF(X11_Xcursor_FOUND) IF(X11_Xcursor_FOUND)
INCLUDE_DIRECTORIES(${X11_Xcursor_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${X11_Xcursor_INCLUDE_PATH})
ADD_DEFINITIONS(-DHAVE_XCURSOR) ADD_DEFINITIONS(-DHAVE_XCURSOR)
TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xcursor_LIB}) TARGET_LINK_LIBRARIES(${NLDRV_OGLES_LIB} ${X11_Xcursor_LIB})
ENDIF(X11_Xcursor_FOUND) ENDIF()
ENDIF(UNIX AND NOT APPLE) ENDIF()
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGLES_LIB} ${SOURCE_DIR}/stdopengl.h ${SOURCE_DIR}/stdopengl.cpp) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGLES_LIB} ${SOURCE_DIR}/stdopengl.h ${SOURCE_DIR}/stdopengl.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
INSTALL(TARGETS ${NLDRV_OGLES_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d) INSTALL(TARGETS ${NLDRV_OGLES_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} COMPONENT drivers3d)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS ${NLDRV_OGLES_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d) INSTALL(TARGETS ${NLDRV_OGLES_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -11,11 +11,11 @@ NL_ADD_LIB_SUFFIX(nel_drv_dsound_win)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound_win ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound_win ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound) INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) INSTALL(TARGETS nel_drv_dsound_win RUNTIME DESTINATION maxplugin COMPONENT driverssound)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -11,11 +11,11 @@ NL_ADD_LIB_SUFFIX(nel_drv_fmod_win)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod_win ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod_win ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound) INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) INSTALL(TARGETS nel_drv_fmod_win RUNTIME DESTINATION maxplugin COMPONENT driverssound)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -2,9 +2,9 @@ FILE(GLOB SRC *.cpp *.h *.def)
IF(WIN32) IF(WIN32)
SET(NLDRV_AL_LIB "nel_drv_openal_win") SET(NLDRV_AL_LIB "nel_drv_openal_win")
ELSE(WIN32) ELSE()
SET(NLDRV_AL_LIB "nel_drv_openal") SET(NLDRV_AL_LIB "nel_drv_openal")
ENDIF(WIN32) ENDIF()
SOURCE_GROUP(efx FILES SOURCE_GROUP(efx FILES
effect_al.cpp effect_al.cpp
@ -38,15 +38,15 @@ IF(WIN32)
FIND_PACKAGE(EFXUtil) FIND_PACKAGE(EFXUtil)
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY})
ENDIF(WIN32) ENDIF()
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) 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 ${NL_LIB_PREFIX} COMPONENT driverssound) INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound) INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -38,11 +38,11 @@ NL_ADD_LIB_SUFFIX(nel_drv_xaudio2_win)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2_win ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2_win ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp)
ENDIF(WITH_PCH) ENDIF()
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound) INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
IF(WITH_MAXPLUGIN) IF(WITH_MAXPLUGIN)
INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION maxplugin COMPONENT driverssound) INSTALL(TARGETS nel_drv_xaudio2_win RUNTIME DESTINATION maxplugin COMPONENT driverssound)
ENDIF(WITH_MAXPLUGIN) ENDIF()
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS) ENDIF()

View file

@ -10,7 +10,7 @@ ADD_SUBDIRECTORY(seven_zip)
IF(WITH_RYZOM_PATCH) IF(WITH_RYZOM_PATCH)
ADD_DEFINITIONS(-DRZ_USE_PATCH) ADD_DEFINITIONS(-DRZ_USE_PATCH)
ENDIF(WITH_RYZOM_PATCH) ENDIF()
FILE(GLOB CFG ../*.cfg ../*.cfg.in) FILE(GLOB CFG ../*.cfg ../*.cfg.in)
FILE(GLOB SRC *.cpp *.h motion/*.cpp motion/*.h client.rc) FILE(GLOB SRC *.cpp *.h motion/*.cpp motion/*.h client.rc)
@ -59,7 +59,7 @@ if(APPLE)
SET(RYZOM_CONTENTS_DIR ${RYZOM_OUTPUT_DIR}/Contents) SET(RYZOM_CONTENTS_DIR ${RYZOM_OUTPUT_DIR}/Contents)
SET(RYZOM_RESOURCES_DIR ${RYZOM_CONTENTS_DIR}/Resources) SET(RYZOM_RESOURCES_DIR ${RYZOM_CONTENTS_DIR}/Resources)
SET(MAC_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/ryzom/client/macosx) SET(MAC_RESOURCES_DIR ${CMAKE_SOURCE_DIR}/ryzom/client/macosx)
ENDIF(APPLE) ENDIF()
ADD_EXECUTABLE(ryzom_client WIN32 MACOSX_BUNDLE ${SRC} ${SRC_INTERFACE} ${SRC_MODE} ${SRC_R2}) ADD_EXECUTABLE(ryzom_client WIN32 MACOSX_BUNDLE ${SRC} ${SRC_INTERFACE} ${SRC_MODE} ${SRC_R2})
@ -73,8 +73,8 @@ IF(APPLE)
IF(RYZOM_DATA_DIR) IF(RYZOM_DATA_DIR)
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR}) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR})
ENDIF(RYZOM_DATA_DIR) ENDIF()
ENDIF(APPLE) ENDIF()
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
@ -105,12 +105,12 @@ TARGET_LINK_LIBRARIES(ryzom_client
IF(NOT APPLE AND NOT WIN32) 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) ENDIF()
IF(APPLE) IF(APPLE)
FIND_LIBRARY(FOUNDATION_LIBRARY Foundation) FIND_LIBRARY(FOUNDATION_LIBRARY Foundation)
TARGET_LINK_LIBRARIES(ryzom_client ${FOUNDATION_LIBRARY}) TARGET_LINK_LIBRARIES(ryzom_client ${FOUNDATION_LIBRARY})
ENDIF(APPLE) ENDIF()
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ${LUABIND_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${CURL_DEFINITIONS} ${LUABIND_DEFINITIONS})
@ -124,13 +124,13 @@ IF(WITH_RYZOM_CLIENT_UAC)
SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/level='requireAdministrator'") SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/level='requireAdministrator'")
ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles") ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"") SET_PROPERTY(TARGET ryzom_client PROPERTY LINK_FLAGS_RELEASE "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio") ENDIF()
ENDIF(WITH_RYZOM_CLIENT_UAC) ENDIF()
IF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) IF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS))
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
ENDIF(WITH_PCH AND (NOT MINGW OR NOT WITH_SYMBOLS)) ENDIF()
INSTALL(TARGETS ryzom_client RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications) INSTALL(TARGETS ryzom_client RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications)
ENDIF(WITH_RYZOM_CLIENT) ENDIF()