mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 16:38:43 +00:00
Change: #842 Setting WITH_STATIC_DRIVERS links GL/D3D and FMOD/AL/DS/XA to 3D and sound respectively.
This commit is contained in:
parent
e451eaacd7
commit
5d34a6148e
7 changed files with 89 additions and 49 deletions
|
@ -19,6 +19,18 @@
|
|||
#-----------------------------------------------------------------------------
|
||||
# Load some macros.
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set CMake 2.6 Policies.
|
||||
IF(COMMAND cmake_policy)
|
||||
# Works around warnings libraries linked against that don't
|
||||
# have absolute paths (e.g. -lpthreads)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
|
||||
# Works around warnings about escaped quotes in ADD_DEFINITIONS
|
||||
# statements
|
||||
cmake_policy(SET CMP0005 OLD)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/nel.cmake)
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
|
||||
|
||||
|
@ -47,18 +59,6 @@ SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}")
|
|||
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set CMake 2.6 Policies.
|
||||
IF(COMMAND cmake_policy)
|
||||
# Works around warnings libraries linked against that don't
|
||||
# have absolute paths (e.g. -lpthreads)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
|
||||
# Works around warnings about escaped quotes in ADD_DEFINITIONS
|
||||
# statements
|
||||
cmake_policy(SET CMP0005 OLD)
|
||||
ENDIF(COMMAND cmake_policy)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Set default config options
|
||||
#
|
||||
|
|
|
@ -68,6 +68,63 @@ MACRO(NL_ADD_RUNTIME_FLAGS name)
|
|||
ENDIF(WITH_STLPORT)
|
||||
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
||||
|
||||
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||
IF(WITH_STATIC_DRIVERS)
|
||||
IF(WIN32)
|
||||
IF(WITH_DRIVER_DIRECT3D)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
||||
ENDIF(WITH_DRIVER_DIRECT3D)
|
||||
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_DRIVER_OPENAL)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
||||
ENDIF(WITH_DRIVER_OPENAL)
|
||||
|
||||
IF(WITH_DRIVER_FMOD)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
||||
ENDIF(WITH_DRIVER_FMOD)
|
||||
|
||||
IF(WITH_DRIVER_OPENGL)
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
||||
ELSE(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WITH_DRIVER_OPENGL)
|
||||
ENDIF(WITH_STATIC_DRIVERS)
|
||||
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
||||
|
||||
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||
IF(WITH_STATIC_DRIVERS)
|
||||
IF(WIN32)
|
||||
IF(WITH_DRIVER_DSOUND)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound)
|
||||
ENDIF(WITH_DRIVER_DSOUND)
|
||||
|
||||
IF(WITH_DRIVER_XAUDIO2)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2)
|
||||
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(WITH_DRIVER_OPENAL)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
||||
ENDIF(WITH_DRIVER_OPENAL)
|
||||
|
||||
IF(WITH_DRIVER_FMOD)
|
||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
||||
ENDIF(WITH_DRIVER_FMOD)
|
||||
|
||||
ENDIF(WITH_STATIC_DRIVERS)
|
||||
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
|
||||
|
||||
###
|
||||
# Checks build vs. source location. Prevents In-Source builds.
|
||||
###
|
||||
|
|
|
@ -667,7 +667,7 @@ NL_TARGET_LIB(nel3d ${SRC})
|
|||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
|
||||
NL_DEFAULT_PROPS(nel3d "Library: NeL 3D")
|
||||
|
||||
NL_ADD_STATIC_VID_DRIVERS(nel3d)
|
||||
NL_ADD_LIB_SUFFIX(nel3d)
|
||||
|
||||
IF(WIN32)
|
||||
|
|
|
@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
|||
TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${LIBXML2_LIBRARIES} nelsound)
|
||||
nl_default_props(nelsnd_lowlevel "Library: NeL Sound Lowlevel")
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
NL_ADD_STATIC_VID_DRIVERS(nelsnd_lowlevel)
|
||||
nl_add_lib_suffix(nelsnd_lowlevel)
|
||||
|
||||
INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_LIBRARY(nel_drv_dsound SHARED ${SRC})
|
||||
NL_TARGET_DRIVER(nel_drv_dsound ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_dsound ${LIBXML2_LIBRARIES} nelsnd_lowlevel ${DXSDK_DSOUND_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(nel_drv_dsound PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
SOVERSION ${NL_VERSION_MAJOR}
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "Driver, Sound: DirectSound")
|
||||
|
||||
NL_DEFAULT_PROPS(nel_drv_dsound "Driver, Sound: DirectSound")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_dsound)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_dsound)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_LIBRARY(nel_drv_fmod SHARED ${SRC})
|
||||
NL_TARGET_DRIVER(nel_drv_fmod ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FMOD_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_fmod ${LIBXML2_LIBRARIES} ${FMOD_LIBRARY} nelsnd_lowlevel)
|
||||
SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
SOVERSION ${NL_VERSION_MAJOR}
|
||||
PROJECT_LABEL "Driver, Sound: FMOD")
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r")
|
||||
ENDIF(WIN32)
|
||||
NL_DEFAULT_PROPS(nel_drv_fmod "Driver, Sound: FMOD")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_fmod)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_fmod)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp)
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
ADD_LIBRARY(nel_drv_xaudio2 SHARED ${SRC})
|
||||
NL_TARGET_DRIVER(nel_drv_xaudio2 ${SRC})
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${DXSDK_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
|
||||
TARGET_LINK_LIBRARIES(nel_drv_xaudio2 ${LIBXML2_LIBRARIES} nelsnd_lowlevel ${DXSDK_XAUDIO_LIBRARY} ${DXSDK_GUID_LIBRARY} ${VORBIS_LIBRARIES} ${OGG_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES
|
||||
VERSION ${NL_VERSION}
|
||||
SOVERSION ${NL_VERSION_MAJOR})
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||
DEBUG_POSTFIX "_d"
|
||||
RELEASE_POSTFIX "_r"
|
||||
PROJECT_LABEL "Driver, Sound: XAudio2")
|
||||
ENDIF(WIN32)
|
||||
NL_DEFAULT_PROPS(nel_drv_xaudio2 "Driver, Sound: XAudio2")
|
||||
NL_ADD_LIB_SUFFIX(nel_drv_xaudio2)
|
||||
NL_ADD_RUNTIME_FLAGS(nel_drv_xaudio2)
|
||||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_PCH)
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2 ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp)
|
||||
|
|
Loading…
Reference in a new issue