Changed: #842 Added helper macros to cleanup files, removed useless DECORATE_NEL_LIB macro and started adding WITH_STATIC/WITH_STATIC_DRIVER support for full static linking.
parent
34e58b7f19
commit
b4a635c412
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue