mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-04 17:24:47 +00:00
Changed: #880 Use PCH under Linux with CMake (use the same macros for Windows too)
This commit is contained in:
parent
217d5c17e8
commit
abc2773e09
13 changed files with 93 additions and 162 deletions
|
@ -5,10 +5,9 @@
|
||||||
# PCHSupport_FOUND
|
# PCHSupport_FOUND
|
||||||
#
|
#
|
||||||
# Macro:
|
# Macro:
|
||||||
# ADD_PRECOMPILED_HEADER _targetName _input _dowarn
|
# ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp _dowarn
|
||||||
# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn
|
# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn
|
||||||
# ADD_NATIVE_PRECOMPILED_HEADER _targetName _input _dowarn
|
# ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp _dowarn
|
||||||
# GET_NATIVE_PRECOMPILED_HEADER _targetName _input
|
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
@ -44,6 +43,7 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
||||||
SET(${_out_compile_flags} ${${_flags_var_name}} )
|
SET(${_out_compile_flags} ${${_flags_var_name}} )
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
||||||
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
|
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
|
||||||
LIST(APPEND ${_out_compile_flags} "${${_out_compile_flags}} -fPIC")
|
LIST(APPEND ${_out_compile_flags} "${${_out_compile_flags}} -fPIC")
|
||||||
|
@ -69,20 +69,6 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
||||||
|
|
||||||
ENDMACRO(_PCH_GET_COMPILE_FLAGS)
|
ENDMACRO(_PCH_GET_COMPILE_FLAGS)
|
||||||
|
|
||||||
MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp)
|
|
||||||
|
|
||||||
SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx)
|
|
||||||
FILE(WRITE ${${_dephelp}}
|
|
||||||
"#include \"${_include_file}\"
|
|
||||||
int testfunction()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
)
|
|
||||||
|
|
||||||
ENDMACRO(_PCH_WRITE_PCHDEP_CXX )
|
|
||||||
|
|
||||||
MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
|
MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
|
||||||
|
|
||||||
FILE(TO_NATIVE_PATH ${_input} _native_input)
|
FILE(TO_NATIVE_PATH ${_input} _native_input)
|
||||||
|
@ -104,13 +90,7 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
|
||||||
ENDIF(CMAKE_CXX_COMPILER_ARG1)
|
ENDIF(CMAKE_CXX_COMPILER_ARG1)
|
||||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
SET(_dummy_str "#include <${_input}>")
|
# nothing to do because std*.cpp are already added to target
|
||||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pch_dummy.cpp ${_dummy_str})
|
|
||||||
|
|
||||||
SET(${out_command}
|
|
||||||
${CMAKE_CXX_COMPILER} ${_compile_FLAGS} /c /Fp${_native_output} /Yc${_native_input} pch_dummy.cpp
|
|
||||||
)
|
|
||||||
#/out:${_output}
|
|
||||||
|
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
@ -177,7 +157,7 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
|
||||||
|
|
||||||
ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
|
ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
|
||||||
|
|
||||||
MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
MACRO(ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
||||||
|
|
||||||
SET(_PCH_current_target ${_targetName})
|
SET(_PCH_current_target ${_targetName})
|
||||||
|
|
||||||
|
@ -194,20 +174,16 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
||||||
SET(_dowarn 1)
|
SET(_dowarn 1)
|
||||||
ENDIF("${ARGN}" STREQUAL "0")
|
ENDIF("${ARGN}" STREQUAL "0")
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(_name ${_input} NAME)
|
GET_FILENAME_COMPONENT(_name ${_inputh} NAME)
|
||||||
GET_FILENAME_COMPONENT(_path ${_input} PATH)
|
GET_FILENAME_COMPONENT(_path ${_inputh} PATH)
|
||||||
GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_input} _output)
|
GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_inputh} _output)
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(_outdir ${_output} PATH )
|
GET_FILENAME_COMPONENT(_outdir ${_output} PATH )
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
||||||
_PCH_WRITE_PCHDEP_CXX(${_targetName} ${_input} _pch_dephelp_cxx)
|
|
||||||
|
|
||||||
IF(${_targetType} STREQUAL SHARED_LIBRARY)
|
# always build static library because it doesn't need linking
|
||||||
ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx} )
|
ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_inputcpp})
|
||||||
ELSE(${_targetType} STREQUAL SHARED_LIBRARY)
|
|
||||||
ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx})
|
|
||||||
ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
|
|
||||||
|
|
||||||
FILE(MAKE_DIRECTORY ${_outdir})
|
FILE(MAKE_DIRECTORY ${_outdir})
|
||||||
|
|
||||||
|
@ -218,8 +194,8 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1)
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1)
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc
|
COMMAND ${CMAKE_COMMAND} -E copy ${_inputh} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc
|
||||||
DEPENDS ${_input}
|
DEPENDS ${_inputh}
|
||||||
)
|
)
|
||||||
|
|
||||||
#message("_command ${_input} ${_output}")
|
#message("_command ${_input} ${_output}")
|
||||||
|
@ -231,38 +207,13 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT ${_output}
|
OUTPUT ${_output}
|
||||||
COMMAND ${_command}
|
COMMAND ${_command}
|
||||||
DEPENDS ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp
|
DEPENDS ${_inputh} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn})
|
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_inputh} ${_output} ${_dowarn})
|
||||||
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
||||||
|
|
||||||
# Generates the use of precompiled in a target,
|
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
||||||
# without using depency targets (2 extra for each target)
|
|
||||||
# Using Visual, must also add ${_targetName}_pch to sources
|
|
||||||
# Not needed by Xcode
|
|
||||||
|
|
||||||
MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
|
||||||
|
|
||||||
if(CMAKE_GENERATOR MATCHES Visual*)
|
|
||||||
|
|
||||||
SET(_dummy_str "#include \"${_input}\"\n"
|
|
||||||
"// This is required to suppress LNK4221. Very annoying.\n"
|
|
||||||
"void *g_${_targetName}Dummy = 0\;\n")
|
|
||||||
|
|
||||||
# Use of cxx extension for generated files (as Qt does)
|
|
||||||
SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx)
|
|
||||||
if(EXISTS ${${_targetName}_pch})
|
|
||||||
# Check if contents is the same, if not rewrite
|
|
||||||
# todo
|
|
||||||
else(EXISTS ${${_targetName}_pch})
|
|
||||||
FILE(WRITE ${${_targetName}_pch} ${_dummy_str})
|
|
||||||
endif(EXISTS ${${_targetName}_pch})
|
|
||||||
endif(CMAKE_GENERATOR MATCHES Visual*)
|
|
||||||
|
|
||||||
ENDMACRO(GET_NATIVE_PRECOMPILED_HEADER)
|
|
||||||
|
|
||||||
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
|
||||||
|
|
||||||
IF( "${ARGN}" STREQUAL "0")
|
IF( "${ARGN}" STREQUAL "0")
|
||||||
SET(_dowarn 0)
|
SET(_dowarn 0)
|
||||||
|
@ -280,11 +231,11 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
||||||
SET(oldProps "")
|
SET(oldProps "")
|
||||||
endif(${oldProps} MATCHES NOTFOUND)
|
endif(${oldProps} MATCHES NOTFOUND)
|
||||||
|
|
||||||
SET(newProperties "${oldProps} /Yu\"${_input}\" /FI\"${_input}\"")
|
SET(newProperties "${oldProps} /Yu\"${_inputh}\" /FI\"${_inputh}\"")
|
||||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
|
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
|
||||||
|
|
||||||
#also inlude ${oldProps} to have the same compile options
|
#also inlude ${oldProps} to have the same compile options
|
||||||
SET_SOURCE_FILES_PROPERTIES(${${_targetName}_pch} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_input}\"")
|
SET_SOURCE_FILES_PROPERTIES(${_inputcpp} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_inputh}\"")
|
||||||
|
|
||||||
else(CMAKE_GENERATOR MATCHES Visual*)
|
else(CMAKE_GENERATOR MATCHES Visual*)
|
||||||
|
|
||||||
|
@ -299,7 +250,7 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
||||||
|
|
||||||
# When buiding out of the tree, precompiled may not be located
|
# When buiding out of the tree, precompiled may not be located
|
||||||
# Use full path instead.
|
# Use full path instead.
|
||||||
GET_FILENAME_COMPONENT(fullPath ${_input} ABSOLUTE)
|
GET_FILENAME_COMPONENT(fullPath ${_inputh} ABSOLUTE)
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
|
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
|
||||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
|
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
|
||||||
|
@ -307,7 +258,7 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
|
||||||
else (CMAKE_GENERATOR MATCHES Xcode)
|
else (CMAKE_GENERATOR MATCHES Xcode)
|
||||||
|
|
||||||
#Fallback to the "old" precompiled suppport
|
#Fallback to the "old" precompiled suppport
|
||||||
#ADD_PRECOMPILED_HEADER(${_targetName} ${_input} ${_dowarn})
|
ADD_PRECOMPILED_HEADER(${_targetName} ${_inputh} ${_inputcpp} ${_dowarn})
|
||||||
endif(CMAKE_GENERATOR MATCHES Xcode)
|
endif(CMAKE_GENERATOR MATCHES Xcode)
|
||||||
endif(CMAKE_GENERATOR MATCHES Visual*)
|
endif(CMAKE_GENERATOR MATCHES Visual*)
|
||||||
|
|
||||||
|
|
|
@ -678,8 +678,6 @@ SET_TARGET_PROPERTIES(nel3d PROPERTIES
|
||||||
PROJECT_LABEL "Library: NeL 3D")
|
PROJECT_LABEL "Library: NeL 3D")
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nel3d PROPERTIES COMPILE_FLAGS "/Yustd3d.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(std3d.cpp PROPERTIES COMPILE_FLAGS "/Ycstd3d.h")
|
|
||||||
SET_TARGET_PROPERTIES(nel3d PROPERTIES
|
SET_TARGET_PROPERTIES(nel3d PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
|
@ -695,7 +693,7 @@ ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,14 @@ SET_TARGET_PROPERTIES(nel_drv_direct3d_win PROPERTIES
|
||||||
SOVERSION ${NL_VERSION_MAJOR}
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||||
COMPILE_FLAGS "/Yustddirect3d.h"
|
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r"
|
RELEASE_POSTFIX "_r"
|
||||||
PROJECT_LABEL "Driver, Video: Direct3D")
|
PROJECT_LABEL "Driver, Video: Direct3D")
|
||||||
SET_SOURCE_FILES_PROPERTIES(stddirect3d.cpp PROPERTIES COMPILE_FLAGS "/Ycstddirect3d.h")
|
|
||||||
ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS)
|
ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
|
@ -22,8 +22,6 @@ SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${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})
|
||||||
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES COMPILE_FLAGS "/Yustdopengl.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdopengl.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopengl.h")
|
|
||||||
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES
|
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r"
|
RELEASE_POSTFIX "_r"
|
||||||
|
@ -54,7 +52,7 @@ ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
|
@ -20,8 +20,6 @@ SET_TARGET_PROPERTIES(nelgeorges PROPERTIES
|
||||||
PROJECT_LABEL "Library: NeL Georges")
|
PROJECT_LABEL "Library: NeL Georges")
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES COMPILE_FLAGS "/Yustdgeorges.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdgeorges.cpp PROPERTIES COMPILE_FLAGS "/Ycstdgeorges.h")
|
|
||||||
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES
|
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
|
@ -29,6 +27,6 @@ ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nelgeorges ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nelgeorges ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.h ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
|
@ -29,6 +29,8 @@ SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
||||||
SOVERSION ${NL_VERSION_MAJOR}
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
PROJECT_LABEL "Library: NeL Misc")
|
PROJECT_LABEL "Library: NeL Misc")
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FOREACH(FILENAME ${SRC})
|
FOREACH(FILENAME ${SRC})
|
||||||
IF("${FILENAME}" MATCHES "stdmisc.cpp")
|
IF("${FILENAME}" MATCHES "stdmisc.cpp")
|
||||||
|
@ -46,10 +48,8 @@ IF(WIN32)
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||||
|
ELSE(WIN32)
|
||||||
|
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h)
|
|
||||||
|
|
||||||
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
|
@ -31,8 +31,6 @@ SET_TARGET_PROPERTIES(nelnet PROPERTIES
|
||||||
PROJECT_LABEL "Library: NeL Net")
|
PROJECT_LABEL "Library: NeL Net")
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(${NLNET_LIB} PROPERTIES COMPILE_FLAGS "/Yustdnet.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdnet.cpp PROPERTIES COMPILE_FLAGS "/Ycstdnet.h")
|
|
||||||
SET_TARGET_PROPERTIES(${NLNET_LIB} PROPERTIES
|
SET_TARGET_PROPERTIES(${NLNET_LIB} PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
|
@ -40,6 +38,6 @@ ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(${NLNET_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(${NLNET_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.h ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS ${NLNET_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS ${NLNET_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
|
@ -20,6 +20,6 @@ IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nelpacs PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
SET_TARGET_PROPERTIES(nelpacs PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nelpacs ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nelpacs ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
|
@ -23,14 +23,12 @@ SET_TARGET_PROPERTIES(nelsound PROPERTIES
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nelsound PROPERTIES COMPILE_FLAGS "/Yustdsound.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdsound.cpp PROPERTIES COMPILE_FLAGS "/Ycstdsound.h")
|
|
||||||
SET_TARGET_PROPERTIES(nelsound PROPERTIES
|
SET_TARGET_PROPERTIES(nelsound PROPERTIES
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nelsound ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nelsound ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,12 @@ SET_TARGET_PROPERTIES(nel_drv_dsound PROPERTIES
|
||||||
SOVERSION ${NL_VERSION_MAJOR}
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||||
COMPILE_FLAGS "/Yustddsound.h"
|
|
||||||
DEBUG_POSTFIX "_d"
|
DEBUG_POSTFIX "_d"
|
||||||
RELEASE_POSTFIX "_r"
|
RELEASE_POSTFIX "_r"
|
||||||
PROJECT_LABEL "Driver, Sound: DirectSound")
|
PROJECT_LABEL "Driver, Sound: DirectSound")
|
||||||
SET_SOURCE_FILES_PROPERTIES(stddsound.cpp PROPERTIES COMPILE_FLAGS "/Ycstddsound.h")
|
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel_drv_dsound ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_dsound ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stddsound.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel_drv_dsound RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
INSTALL(TARGETS nel_drv_dsound RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
|
@ -11,8 +11,6 @@ SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES COMPILE_FLAGS "/Yustdfmod.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdfmod.cpp PROPERTIES COMPILE_FLAGS "/Ycstdfmod.h")
|
|
||||||
SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES
|
SET_TARGET_PROPERTIES(nel_drv_fmod PROPERTIES
|
||||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||||
|
@ -20,7 +18,7 @@ IF(WIN32)
|
||||||
RELEASE_POSTFIX "_r")
|
RELEASE_POSTFIX "_r")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel_drv_fmod ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_fmod ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.h ${CMAKE_CURRENT_SOURCE_DIR}/stdfmod.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel_drv_fmod RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
INSTALL(TARGETS nel_drv_fmod RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
|
@ -15,8 +15,6 @@ IF(WIN32)
|
||||||
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
|
||||||
TARGET_LINK_LIBRARIES(nel_drv_openal ${EFXUTIL_LIBRARY})
|
TARGET_LINK_LIBRARIES(nel_drv_openal ${EFXUTIL_LIBRARY})
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES COMPILE_FLAGS "/Yustdopenal.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdopenal.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopenal.h")
|
|
||||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES
|
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES
|
||||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||||
|
@ -25,7 +23,7 @@ IF(WIN32)
|
||||||
PROJECT_LABEL "Driver, Sound: OpenAL")
|
PROJECT_LABEL "Driver, Sound: OpenAL")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel_drv_openal ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_openal ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel_drv_openal RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
INSTALL(TARGETS nel_drv_openal RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
|
@ -10,8 +10,6 @@ SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES COMPILE_FLAGS "/Yustdxaudio2.h")
|
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdxaudio2.cpp PROPERTIES COMPILE_FLAGS "/Ycstdxaudio2.h")
|
|
||||||
SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES
|
SET_TARGET_PROPERTIES(nel_drv_xaudio2 PROPERTIES
|
||||||
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
|
||||||
|
@ -20,7 +18,7 @@ IF(WIN32)
|
||||||
PROJECT_LABEL "Driver, Sound: XAudio2")
|
PROJECT_LABEL "Driver, Sound: XAudio2")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ADD_PRECOMPILED_HEADER(nel_drv_xaudio2 ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_xaudio2 ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.h ${CMAKE_CURRENT_SOURCE_DIR}/stdxaudio2.cpp)
|
||||||
|
|
||||||
INSTALL(TARGETS nel_drv_xaudio2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
INSTALL(TARGETS nel_drv_xaudio2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT driverssound)
|
||||||
IF(WITH_MAXPLUGIN)
|
IF(WITH_MAXPLUGIN)
|
||||||
|
|
Loading…
Reference in a new issue