This commit is contained in:
rti 2010-07-14 20:40:46 +02:00
commit 6c5b758655
31 changed files with 180 additions and 313 deletions

View file

@ -75,6 +75,14 @@ FIND_PACKAGE(Jpeg)
NL_SETUP_BUILD() NL_SETUP_BUILD()
IF(WITH_STATIC_DRIVERS)
IF(WIN32)
ADD_DEFINITIONS(/DNL_STATIC)
ELSE(WIN32)
ADD_DEFINITIONS(-DNL_STATIC)
ENDIF(WIN32)
ENDIF(WITH_STATIC_DRIVERS)
# On Windows we need to find DirectInput for NLMISC. # On Windows we need to find DirectInput for NLMISC.
# This is how we get events. # This is how we get events.
IF(WIN32) IF(WIN32)

View file

@ -1,27 +1,69 @@
### ###
# Build Library Name # Helper macro that generates .pc and installs it.
# Argument: name - the name of the .pc package, e.g. "nel-pacs.pc"
###
MACRO(NL_GEN_PC name)
IF(NOT WIN32)
CONFIGURE_FILE(${name}.in ${name})
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/pkgconfig)
ENDIF(NOT WIN32)
ENDMACRO(NL_GEN_PC)
###
# #
# Arguments: name - undecorated library name
# Sets: LIBNAME - decorated library name
### ###
MACRO(DECORATE_NEL_LIB name) MACRO(NL_TARGET_LIB name)
IF(WITH_STATIC)
ADD_LIBRARY(${name} STATIC ${ARGN})
ELSE(WITH_STATIC)
ADD_LIBRARY(${name} SHARED ${ARGN})
ENDIF(WITH_STATIC)
ENDMACRO(NL_TARGET_LIB)
###
#
###
MACRO(NL_TARGET_DRIVER name)
IF(WITH_STATIC_DRIVERS)
ADD_LIBRARY(${name} STATIC ${ARGN})
ELSE(WITH_STATIC_DRIVERS)
ADD_LIBRARY(${name} SHARED ${ARGN})
ENDIF(WITH_STATIC_DRIVERS)
ENDMACRO(NL_TARGET_DRIVER)
###
# Helper macro that sets the default library properties.
# Argument: name - the target name whose properties are being set
# Argument:
###
MACRO(NL_DEFAULT_PROPS name label)
SET_TARGET_PROPERTIES(${name} PROPERTIES
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL ${label})
ENDMACRO(NL_DEFAULT_PROPS)
###
# Adds the target suffix on Windows.
# Argument: name - the library's target name.
###
MACRO(NL_ADD_LIB_SUFFIX name)
IF(WIN32) IF(WIN32)
IF(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG") SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
SET(LIBNAME "${name}")
ELSE(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG")
IF(NL_BUILD_MODE MATCHES "NL_DEBUG")
SET(LIBNAME "${name}")
ELSE(NL_BUILD_MODE MATCHES "NL_DEBUG")
SET(LIBNAME "${name}")
ENDIF(NL_BUILD_MODE MATCHES "NL_DEBUG")
ENDIF(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG")
ELSE(WIN32)
SET(LIBNAME "${name}")
ENDIF(WIN32) ENDIF(WIN32)
ENDMACRO(NL_ADD_LIB_SUFFIX)
ENDMACRO(DECORATE_NEL_LIB) ###
# Adds the runtime link flags for Win32 binaries.
# Argument: name - the target to add the link flags to.
###
MACRO(NL_ADD_RUNTIME_FLAGS name)
IF(WIN32)
SET_TARGET_PROPERTIES(${name} PROPERTIES
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
ENDIF(WIN32)
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
### ###
# Checks build vs. source location. Prevents In-Source builds. # Checks build vs. source location. Prevents In-Source builds.
### ###
@ -49,6 +91,14 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_COVERAGE "With Code Coverage Support" OFF) OPTION(WITH_COVERAGE "With Code Coverage Support" OFF)
OPTION(WITH_PCH "With Precompiled Headers" ON ) OPTION(WITH_PCH "With Precompiled Headers" ON )
# Default to static building on Windows.
IF(WIN32)
OPTION(WITH_STATIC "With static libraries." ON )
ELSE(WIN32)
OPTION(WITH_STATIC "With static libraries." OFF)
ENDIF(WIN32)
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
### ###
# Core libraries # Core libraries
### ###

View file

@ -34,7 +34,7 @@ namespace NL3D {
template <> template <>
const char *CPSAttribMaker<NLMISC::CRGBA>::getType() { return "CRGBA"; } inline const char *CPSAttribMaker<NLMISC::CRGBA>::getType() { return "CRGBA"; }
// Depending on the driver, the format of colors in vertex buffer may change. We don't want to change the format for each data that is (dynamically) in vertex buffer, so // Depending on the driver, the format of colors in vertex buffer may change. We don't want to change the format for each data that is (dynamically) in vertex buffer, so

View file

@ -28,7 +28,7 @@
namespace NL3D { namespace NL3D {
template <> template <>
const char *CPSAttribMaker<float>::getType() { return "float"; } inline const char *CPSAttribMaker<float>::getType() { return "float"; }
/// these are some attribute makers for float /// these are some attribute makers for float
/// This is a float blender class. It just blend between 2 values /// This is a float blender class. It just blend between 2 values

View file

@ -26,7 +26,7 @@
namespace NL3D { namespace NL3D {
template <> template <>
const char *CPSAttribMaker<uint32>::getType() { return "int32"; } inline const char *CPSAttribMaker<uint32>::getType() { return "int32"; }
/// these are some attribute makers for int /// these are some attribute makers for int

View file

@ -28,7 +28,7 @@
namespace NL3D { namespace NL3D {
template <> template <>
const char *CPSAttribMaker<CPlaneBasis>::getType() { return "CPlaneBasis";} inline const char *CPSAttribMaker<CPlaneBasis>::getType() { return "CPlaneBasis";}
/** these are some attribute makers for plane_basis /** these are some attribute makers for plane_basis
* This is a plane basis class. It just blend between 2 plane by linearly interpolating the normal * This is a plane basis class. It just blend between 2 plane by linearly interpolating the normal

View file

@ -1,18 +1,14 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(nl_sample_clusterview ${SRC}) ADD_EXECUTABLE(nl_sample_clusterview WIN32 ${SRC})
ADD_DEFINITIONS(-DCV_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_clusterview/\\"") ADD_DEFINITIONS(-DCV_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_clusterview/\\"")
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_clusterview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d) TARGET_LINK_LIBRARIES(nl_sample_clusterview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
IF(WIN32) NL_ADD_RUNTIME_FLAGS(nl_sample_clusterview)
SET_TARGET_PROPERTIES(nl_sample_clusterview PROPERTIES NL_DEFAULT_PROPS(nl_sample_clusterview "Samples, 3D: Cluster Viewer")
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
PROJECT_LABEL "Samples, 3D: Cluster Viewer")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_clusterview RUNTIME DESTINATION bin COMPONENT samples3d) INSTALL(TARGETS nl_sample_clusterview RUNTIME DESTINATION bin COMPONENT samples3d)

View file

@ -1,18 +1,14 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(nl_sample_font ${SRC}) ADD_EXECUTABLE(nl_sample_font WIN32 ${SRC})
ADD_DEFINITIONS(-DFONT_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_font/\\"") ADD_DEFINITIONS(-DFONT_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_font/\\"")
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_font ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d) TARGET_LINK_LIBRARIES(nl_sample_font ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_font "Samples, 3D: Font")
SET_TARGET_PROPERTIES(nl_sample_font PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_font)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
PROJECT_LABEL "Samples, 3D: Font")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_font RUNTIME DESTINATION bin COMPONENT samples3d) INSTALL(TARGETS nl_sample_font RUNTIME DESTINATION bin COMPONENT samples3d)

View file

@ -1,14 +1,16 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(nl_sample_shapeview ${SRC}) ADD_EXECUTABLE(nl_sample_shapeview WIN32 ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_shapeview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d) TARGET_LINK_LIBRARIES(nl_sample_shapeview ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc nel3d)
NL_DEFAULT_PROPS(nl_sample_shapeview "Samples, 3D: Font")
NL_ADD_RUNTIME_FLAGS(nl_sample_shapeview)
IF(WIN32) IF(WIN32)
SET_TARGET_PROPERTIES(nl_sample_shapeview PROPERTIES SET_TARGET_PROPERTIES(nl_sample_shapeview 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}"
LINK_FLAGS "/SUBSYSTEM:WINDOWS"
PROJECT_LABEL "Samples, 3D: Shape Viewer") PROJECT_LABEL "Samples, 3D: Shape Viewer")
ENDIF(WIN32) ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})

View file

@ -6,12 +6,9 @@ ADD_DEFINITIONS(-DGF_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_georges/\\"")
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_georges ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelgeorges nelmisc) TARGET_LINK_LIBRARIES(nl_sample_georges ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelgeorges nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_georges "Samples: Georges")
SET_TARGET_PROPERTIES(nl_sample_georges PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_georges)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples: Georges")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_georges RUNTIME DESTINATION bin COMPONENT samplesgeorges) INSTALL(TARGETS nl_sample_georges RUNTIME DESTINATION bin COMPONENT samplesgeorges)

View file

@ -4,12 +4,9 @@ ADD_EXECUTABLE(nl_sample_command ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_command ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_command ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_command "Samples, Misc: Commands")
SET_TARGET_PROPERTIES(nl_sample_command PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_command)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: Commands")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_command RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_command RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -6,12 +6,9 @@ ADD_DEFINITIONS(-DNL_SAMPLE_CFG="\\"${NL_SHARE_PREFIX}/nl_sample_configfile/\\""
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_configfile ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_configfile ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_configfile "Samples, Misc: Config Files")
SET_TARGET_PROPERTIES(nl_sample_configfile PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_configfile)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: Config Files")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_configfile RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_configfile RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -1,18 +1,12 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
DECORATE_NEL_LIB("nelmisc")
SET(NLMISC_LIB ${LIBNAME})
ADD_EXECUTABLE(nl_sample_debug ${SRC}) ADD_EXECUTABLE(nl_sample_debug ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_debug ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_debug ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_debug "Samples, Misc: Debugging")
SET_TARGET_PROPERTIES(nl_sample_debug PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_debug)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: Debugging")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_debug RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_debug RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -6,12 +6,9 @@ ADD_DEFINITIONS(-DNL_LANG_DATA="\\"${NL_SHARE_PREFIX}/nl_sample_i18n/\\"")
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_i18n ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_i18n ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_i18n "Samples, Misc: I18N")
SET_TARGET_PROPERTIES(nl_sample_i18n PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_i18n)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: I18N")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_i18n RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_i18n RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -1,18 +1,12 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
DECORATE_NEL_LIB("nelmisc")
SET(NLMISC_LIB ${LIBNAME})
ADD_EXECUTABLE(nl_sample_log ${SRC}) ADD_EXECUTABLE(nl_sample_log ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_log ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_log ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_log "Samples, Misc: Logging")
SET_TARGET_PROPERTIES(nl_sample_log PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_log)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: Logging")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_log RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_log RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -4,12 +4,9 @@ ADD_EXECUTABLE(nl_sample_strings ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_strings ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc) TARGET_LINK_LIBRARIES(nl_sample_strings ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_strings "Samples, Misc: Strings")
SET_TARGET_PROPERTIES(nl_sample_strings PROPERTIES NL_ADD_RUNTIME_FLAGS(nl_sample_strings)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Misc: Strings")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_strings RUNTIME DESTINATION bin COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_strings RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -1,18 +1,11 @@
FILE(GLOB SRC *.cpp) FILE(GLOB SRC *.cpp)
DECORATE_NEL_LIB("nelmisc")
SET(NLMISC_LIB ${LIBNAME})
ADD_EXECUTABLE(nl_sample_types_check ${SRC}) ADD_EXECUTABLE(nl_sample_types_check ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_types_check ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${NLMISC_LIB}) TARGET_LINK_LIBRARIES(nl_sample_types_check ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} nelmisc)
IF(WIN32) NL_ADD_RUNTIME_FLAGS(nl_sample_types_check)
SET_TARGET_PROPERTIES(nl_sample_types_check PROPERTIES
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
)
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_types_check RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT samplesmisc) INSTALL(TARGETS nl_sample_types_check RUNTIME DESTINATION bin COMPONENT samplesmisc)

View file

@ -2,35 +2,22 @@ FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(nl_sample_udpclient client.cpp graph.cpp graph.h simlag.cpp simlag.h) ADD_EXECUTABLE(nl_sample_udpclient client.cpp graph.cpp graph.h simlag.cpp simlag.h)
IF(WIN32)
ADD_EXECUTABLE(nl_sample_udpserver WIN32 bench_service.cpp receive_task.cpp receive_task.h) ADD_EXECUTABLE(nl_sample_udpserver WIN32 bench_service.cpp receive_task.cpp receive_task.h)
ELSE(WIN32)
ADD_EXECUTABLE(nl_sample_udpserver bench_service.cpp receive_task.cpp receive_task.h)
ENDIF(WIN32)
ADD_DEFINITIONS(-DUDP_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_udp/\\"") ADD_DEFINITIONS(-DUDP_DIR="\\"${NL_SHARE_PREFIX}/nl_sample_udp/\\"")
IF(WITH_3D) IF(WITH_3D)
ADD_DEFINITIONS(-DUSE_3D) ADD_DEFINITIONS(-DUSE_3D)
DECORATE_NEL_LIB("nel3d")
SET(NL3D_LIB ${LIBNAME})
ELSE(WITH_3D)
SET(NL3D_LIB "")
ENDIF(WITH_3D) ENDIF(WITH_3D)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nl_sample_udpclient ${PLATFORM_LINKFLAGS} nelmisc nelnet nel3d) TARGET_LINK_LIBRARIES(nl_sample_udpclient ${PLATFORM_LINKFLAGS} nelmisc nelnet nel3d)
TARGET_LINK_LIBRARIES(nl_sample_udpserver ${PLATFORM_LINKFLAGS} nelmisc nelnet) TARGET_LINK_LIBRARIES(nl_sample_udpserver ${PLATFORM_LINKFLAGS} nelmisc nelnet)
IF(WIN32) NL_DEFAULT_PROPS(nl_sample_udpclient "Samples, Net, UDP: UDP Client")
SET_TARGET_PROPERTIES(nl_sample_udpclient PROPERTIES NL_DEFAULT_PROPS(nl_sample_udpserver "Samples, Net, UDP: UDP Server")
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}" NL_ADD_RUNTIME_FLAGS(nl_sample_udpclient)
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}" NL_ADD_RUNTIME_FLAGS(nl_sample_udpserver)
PROJECT_LABEL "Samples, Net, UDP: UDP Client")
SET_TARGET_PROPERTIES(nl_sample_udpserver PROPERTIES
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Samples, Net, UDP: UDP Server")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nl_sample_udpclient nl_sample_udpserver RUNTIME DESTINATION bin COMPONENT samplesnet) INSTALL(TARGETS nl_sample_udpclient nl_sample_udpserver RUNTIME DESTINATION bin COMPONENT samplesnet)

View file

@ -662,26 +662,15 @@ SOURCE_GROUP(Shadows FILES
shadow_poly_receiver.cpp shadow_poly_receiver.cpp
../../include/nel/3d/shadow_poly_receiver.h) ../../include/nel/3d/shadow_poly_receiver.h)
IF(NOT WIN32) NL_TARGET_LIB(nel3d ${SRC})
ADD_LIBRARY(nel3d SHARED ${SRC})
CONFIGURE_FILE(nel-3d.pc.in nel-3d.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-3d.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nel3d STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY} ${JPEG_LIBRARY}) TARGET_LINK_LIBRARIES(nel3d nelmisc ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
SET_TARGET_PROPERTIES(nel3d PROPERTIES NL_DEFAULT_PROPS(nel3d "Library: NeL 3D")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR} NL_ADD_LIB_SUFFIX(nel3d)
PROJECT_LABEL "Library: NeL 3D")
IF(WIN32) IF(WIN32)
SET_TARGET_PROPERTIES(nel3d PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
IF(JPEG_FOUND) IF(JPEG_FOUND)
ADD_DEFINITIONS(/DUSE_JPEG) ADD_DEFINITIONS(/DUSE_JPEG)
ENDIF(JPEG_FOUND) ENDIF(JPEG_FOUND)
@ -697,6 +686,7 @@ IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-3d.pc)
INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ADD_SUBDIRECTORY(driver) ADD_SUBDIRECTORY(driver)

View file

@ -1,23 +1,15 @@
FILE(GLOB SRC *.cpp *.h *.def) FILE(GLOB SRC *.cpp *.h *.def)
DECORATE_NEL_LIB("nel_drv_direct3d_win") NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
SET(NLDRV_D3D_LIB ${LIBNAME})
DECORATE_NEL_LIB("nel3d")
SET(NL3D_LIB ${LIBNAME})
ADD_LIBRARY(nel_drv_direct3d_win SHARED ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${DXSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${FREETYPE_INC} ${DXSDK_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d ${LIBXML2_LIBRARIES} ${FREETYPE_LIB} ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY}) TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d ${LIBXML2_LIBRARIES} ${FREETYPE_LIB} ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
SET_TARGET_PROPERTIES(nel_drv_direct3d_win PROPERTIES
VERSION ${NL_VERSION} NL_DEFAULT_PROPS(nel_drv_direct3d_win "Driver, Video: Direct3D")
SOVERSION ${NL_VERSION_MAJOR} NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}" NL_ADD_LIB_SUFFIX(nel_drv_direct3d_win)
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r"
PROJECT_LABEL "Driver, Video: Direct3D")
ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS) ADD_DEFINITIONS(/Ddriver_direct3d_EXPORTS)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
@ -26,7 +18,7 @@ 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(WITH_PCH)
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin 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(WITH_MAXPLUGIN)

View file

@ -10,23 +10,17 @@ ELSE(WIN32)
SET(NLDRV_OGL_LIB "nel_drv_opengl") SET(NLDRV_OGL_LIB "nel_drv_opengl")
ENDIF(WIN32) ENDIF(WIN32)
ADD_LIBRARY(${NLDRV_OGL_LIB} SHARED ${SRC}) NL_TARGET_DRIVER(${NLDRV_OGL_LIB} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES}) TARGET_LINK_LIBRARIES(${NLDRV_OGL_LIB} nel3d nelmisc ${OPENGL_LIBRARIES})
SET_TARGET_PROPERTIES(${NLDRV_OGL_LIB} PROPERTIES NL_DEFAULT_PROPS(${NLDRV_OGL_LIB} "Driver, Video: OpenGL")
VERSION ${NL_VERSION} NL_ADD_LIB_SUFFIX(${NLDRV_OGL_LIB})
SOVERSION ${NL_VERSION_MAJOR} NL_ADD_RUNTIME_FLAGS(${NLDRV_OGL_LIB})
PROJECT_LABEL "Driver, Video: OpenGL")
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
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r"
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
ADD_DEFINITIONS(/DDRIVER_OPENGL_EXPORTS) ADD_DEFINITIONS(/DDRIVER_OPENGL_EXPORTS)
ELSE(WIN32) ELSE(WIN32)
IF(APPLE) IF(APPLE)
@ -61,7 +55,7 @@ IF(NOT WITH_COCOA AND 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(NOT WITH_COCOA AND WITH_PCH) ENDIF(NOT WITH_COCOA AND WITH_PCH)
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin 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(WITH_MAXPLUGIN)

View file

@ -4,26 +4,13 @@ FILE(GLOB PUB_H ../../include/nel/georges/*.h)
SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H}) SOURCE_GROUP(headers FILES ${PRIV_H} ${PUB_H})
IF(NOT WIN32) NL_TARGET_LIB(nelgeorges ${SRC})
ADD_LIBRARY(nelgeorges SHARED ${SRC})
CONFIGURE_FILE(nel-georges.pc.in nel-georges.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-georges.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelgeorges STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelgeorges nelmisc) TARGET_LINK_LIBRARIES(nelgeorges nelmisc)
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES NL_DEFAULT_PROPS(nelgeorges "Library: NeL Georges")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Georges")
IF(WIN32) NL_ADD_LIB_SUFFIX(nelgeorges)
SET_TARGET_PROPERTIES(nelgeorges PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
@ -31,4 +18,5 @@ IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nelgeorges ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.h ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nelgeorges ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.h ${CMAKE_CURRENT_SOURCE_DIR}/stdgeorges.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-georges.pc)
INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -1,27 +1,14 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
IF(NOT WIN32) NL_TARGET_LIB(nelligo ${SRC})
ADD_LIBRARY(nelligo SHARED ${SRC})
CONFIGURE_FILE(nel-ligo.pc.in nel-ligo.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-ligo.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelligo STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelligo ${LIBXML2_LIBRARIES} nelmisc) TARGET_LINK_LIBRARIES(nelligo ${LIBXML2_LIBRARIES} nelmisc)
SET_TARGET_PROPERTIES(nelligo PROPERTIES NL_DEFAULT_PROPS(nelligo "Library: NeL Ligo")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Ligo")
IF(WIN32)
SET_TARGET_PROPERTIES(nelligo PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
ENDIF(WIN32)
NL_ADD_LIB_SUFFIX(nelligo)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
NL_GEN_PC(nel-ligo.pc)
INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -1,23 +1,12 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
IF(NOT WIN32) NL_TARGET_LIB(nellogic ${SRC})
ADD_LIBRARY(nellogic SHARED ${SRC})
ELSE(NOT WIN32)
ADD_LIBRARY(nellogic STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nellogic ${LIBXML2_LIBRARIES} nelmisc nelnet) TARGET_LINK_LIBRARIES(nellogic ${LIBXML2_LIBRARIES} nelmisc nelnet)
SET_TARGET_PROPERTIES(nellogic PROPERTIES NL_DEFAULT_PROPS(nellogic "Library: NeL Logic")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Logic")
IF(WIN32) NL_ADD_LIB_SUFFIX(nellogic)
SET_TARGET_PROPERTIES(nellogic PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})

View file

@ -1,12 +1,6 @@
FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h) FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
IF(NOT WIN32) NL_TARGET_LIB(nelmisc ${SRC})
ADD_LIBRARY(nelmisc SHARED ${SRC})
CONFIGURE_FILE(nel-misc.pc.in nel-misc.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-misc.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelmisc STATIC ${SRC})
ENDIF(NOT WIN32)
IF(WITH_GTK) IF(WITH_GTK)
IF(GTK2_FOUND) IF(GTK2_FOUND)
@ -24,17 +18,9 @@ ENDIF(JPEG_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
TARGET_LINK_LIBRARIES(nelmisc ${LIBXML2_LIBRARIES} ${PNG_LIBRARIES} ${WINSOCK2_LIB}) TARGET_LINK_LIBRARIES(nelmisc ${LIBXML2_LIBRARIES} ${PNG_LIBRARIES} ${WINSOCK2_LIB})
SET_TARGET_PROPERTIES(nelmisc PROPERTIES NL_DEFAULT_PROPS(nelmisc "Library: NeL Misc")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Misc")
IF(WIN32) NL_ADD_LIB_SUFFIX(nelmisc)
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
@ -42,4 +28,5 @@ IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-misc.pc)
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -2,18 +2,7 @@ FILE(GLOB SRC "*.cpp")
FILE(GLOB NET_MANAGER "net_manager.*") FILE(GLOB NET_MANAGER "net_manager.*")
LIST(REMOVE_ITEM SRC ${NET_MANAGER}) LIST(REMOVE_ITEM SRC ${NET_MANAGER})
DECORATE_NEL_LIB("nelmisc") NL_TARGET_LIB(nelnet ${SRC})
SET(NLMISC_LIB ${LIBNAME})
DECORATE_NEL_LIB("nelnet")
SET(NLNET_LIB ${LIBNAME})
IF(NOT WIN32)
ADD_LIBRARY(nelnet SHARED ${SRC})
CONFIGURE_FILE(nel-net.pc.in nel-net.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-net.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelnet STATIC ${SRC})
ENDIF(NOT WIN32)
IF(WITH_GTK) IF(WITH_GTK)
IF(GTK2_FOUND) IF(GTK2_FOUND)
@ -24,22 +13,16 @@ ENDIF(WITH_GTK)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelnet ${LIBXML2_LIBRARIES} ${NLMISC_LIB}) TARGET_LINK_LIBRARIES(nelnet ${LIBXML2_LIBRARIES} nelmisc)
SET_TARGET_PROPERTIES(nelnet PROPERTIES NL_DEFAULT_PROPS(nelnet "Library: NeL Net")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Net")
IF(WIN32) NL_ADD_LIB_SUFFIX(nelnet)
SET_TARGET_PROPERTIES(${NLNET_LIB} PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(${NLNET_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.h ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nelnet ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.h ${CMAKE_CURRENT_SOURCE_DIR}/stdnet.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
INSTALL(TARGETS ${NLNET_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) NL_GEN_PC(nel-net.pc)
INSTALL(TARGETS nelnet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -1,27 +1,17 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
IF(NOT WIN32) NL_TARGET_LIB(nelpacs ${SRC})
ADD_LIBRARY(nelpacs SHARED ${SRC})
CONFIGURE_FILE(nel-pacs.pc.in nel-pacs.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-pacs.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelpacs STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelpacs ${LIBXML2_LIBRARIES} nelmisc) TARGET_LINK_LIBRARIES(nelpacs ${LIBXML2_LIBRARIES} nelmisc)
SET_TARGET_PROPERTIES(nelpacs PROPERTIES NL_DEFAULT_PROPS(nelpacs "Library: NeL PACS")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL PACS")
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WIN32) NL_ADD_LIB_SUFFIX(nelpacs)
SET_TARGET_PROPERTIES(nelpacs PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
ENDIF(WIN32)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nelpacs ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nelpacs ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpacs.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-pacs.pc)
INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -6,32 +6,20 @@ IF(APPLE)
SET(SRC ${SRC} driver/sound_driver.cpp driver/buffer.cpp) SET(SRC ${SRC} driver/sound_driver.cpp driver/buffer.cpp)
ENDIF(APPLE) ENDIF(APPLE)
IF(NOT WIN32) nl_target_lib(nelsound ${SRC})
ADD_LIBRARY(nelsound SHARED ${SRC})
CONFIGURE_FILE(nel-sound.pc.in nel-sound.pc)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-sound.pc" DESTINATION lib/pkgconfig)
ELSE(NOT WIN32)
ADD_LIBRARY(nelsound STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelsound ${LIBXML2_LIBRARIES} nelligo nelgeorges nel3d) TARGET_LINK_LIBRARIES(nelsound ${LIBXML2_LIBRARIES} nelligo nelgeorges nel3d)
SET_TARGET_PROPERTIES(nelsound PROPERTIES nl_default_props(nelsound "Library: NeL Sound")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Sound")
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WIN32) nl_add_lib_suffix(nelsound)
SET_TARGET_PROPERTIES(nelsound PROPERTIES
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r")
ENDIF(WIN32)
IF(WITH_PCH) IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nelsound ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nelsound ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.h ${CMAKE_CURRENT_SOURCE_DIR}/stdsound.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
nl_gen_pc(nel-sound.pc)
INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelsound LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ADD_SUBDIRECTORY(driver) ADD_SUBDIRECTORY(driver)

View file

@ -1,22 +1,13 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
IF(NOT WIN32) nl_target_lib(nelsnd_lowlevel ${SRC})
ADD_LIBRARY(nelsnd_lowlevel SHARED ${SRC})
ELSE(NOT WIN32)
ADD_LIBRARY(nelsnd_lowlevel STATIC ${SRC})
ENDIF(NOT WIN32)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${LIBXML2_LIBRARIES} nelsound) TARGET_LINK_LIBRARIES(nelsnd_lowlevel ${LIBXML2_LIBRARIES} nelsound)
SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES nl_default_props(nelsnd_lowlevel "Library: NeL Sound Lowlevel")
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
PROJECT_LABEL "Library: NeL Sound Lowlevel")
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WIN32) nl_add_lib_suffix(nelsnd_lowlevel)
SET_TARGET_PROPERTIES(nelsnd_lowlevel PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
ENDIF(WIN32)
INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS nelsnd_lowlevel LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)

View file

@ -1,12 +1,12 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
ADD_LIBRARY(nel_drv_openal SHARED ${SRC}) NL_TARGET_DRIVER(nel_drv_openal ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_drv_openal ${LIBXML2_LIBRARIES} ${OPENAL_LIBRARY} nelsnd_lowlevel) TARGET_LINK_LIBRARIES(nel_drv_openal ${LIBXML2_LIBRARIES} ${OPENAL_LIBRARY} nelsnd_lowlevel)
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES NL_DEFAULT_PROPS(nel_drv_openal "Driver, Sound: OpenAL")
VERSION ${NL_VERSION} NL_ADD_LIB_SUFFIX(nel_drv_openal)
SOVERSION ${NL_VERSION_MAJOR}) NL_ADD_RUNTIME_FLAGS(nel_drv_openal)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WIN32) IF(WIN32)
@ -14,13 +14,6 @@ IF(WIN32)
FIND_PACKAGE(EFXUtil) FIND_PACKAGE(EFXUtil)
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
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
DEBUG_POSTFIX "_d"
RELEASE_POSTFIX "_r"
PROJECT_LABEL "Driver, Sound: OpenAL")
ENDIF(WIN32) ENDIF(WIN32)
IF(WITH_PCH) IF(WITH_PCH)

View file

@ -1,22 +1,12 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
DECORATE_NEL_LIB("nelmisc")
SET(NLMISC_LIB ${LIBNAME})
DECORATE_NEL_LIB("nelnet")
SET(NLNET_LIB ${LIBNAME})
DECORATE_NEL_LIB("nelligo")
SET(NLLIGO_LIB ${LIBNAME})
ADD_EXECUTABLE(nel_unit_test ${SRC}) ADD_EXECUTABLE(nel_unit_test ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CPPTEST_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CPPTEST_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nel_unit_test ${LIBXML2_LIBRARIES} ${CPPTEST_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nelnet nelligo) TARGET_LINK_LIBRARIES(nel_unit_test ${LIBXML2_LIBRARIES} ${CPPTEST_LIBRARY} ${PLATFORM_LINKFLAGS} nelmisc nelnet nelligo)
IF(WIN32) NL_DEFAULT_PROPS(nel_unit_test "Unit Tests")
SET_TARGET_PROPERTIES(nel_unit_test PROPERTIES NL_ADD_RUNTIME_FLAGS(nel_unit_test)
LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}"
PROJECT_LABEL "Unit Tests")
ENDIF(WIN32)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
ADD_DEFINITIONS(-DNEL_UNIT_BASE="\\"${PROJECT_SOURCE_DIR}/tools/nel_unit_test/\\"") ADD_DEFINITIONS(-DNEL_UNIT_BASE="\\"${PROJECT_SOURCE_DIR}/tools/nel_unit_test/\\"")