2010-05-06 00:08:41 +00:00
|
|
|
FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
|
|
|
|
|
|
|
|
IF(NOT WIN32)
|
|
|
|
ADD_LIBRARY(nelmisc SHARED ${SRC})
|
2010-06-09 16:09:56 +00:00
|
|
|
CONFIGURE_FILE(nel-misc.pc.in nel-misc.pc)
|
2010-06-09 21:41:54 +00:00
|
|
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-misc.pc" DESTINATION lib/pkgconfig)
|
2010-05-06 00:08:41 +00:00
|
|
|
ELSE(NOT WIN32)
|
|
|
|
ADD_LIBRARY(nelmisc STATIC ${SRC})
|
|
|
|
ENDIF(NOT WIN32)
|
|
|
|
|
|
|
|
IF(WITH_GTK)
|
|
|
|
IF(GTK2_FOUND)
|
|
|
|
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
|
|
|
|
ADD_DEFINITIONS(-DNL_USE_GTK)
|
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${GTK2_LIBRARIES})
|
|
|
|
ENDIF(GTK2_FOUND)
|
|
|
|
ENDIF(WITH_GTK)
|
|
|
|
|
|
|
|
IF(JPEG_FOUND)
|
|
|
|
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
|
|
|
|
ADD_DEFINITIONS(-DUSE_JPEG)
|
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${JPEG_LIBRARY})
|
|
|
|
ENDIF(JPEG_FOUND)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
|
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${LIBXML2_LIBRARIES} ${PNG_LIBRARIES} ${WINSOCK2_LIB})
|
2010-06-26 15:38:45 +00:00
|
|
|
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
2010-05-06 00:08:41 +00:00
|
|
|
VERSION ${NL_VERSION}
|
2010-06-14 08:30:17 +00:00
|
|
|
SOVERSION ${NL_VERSION_MAJOR}
|
2010-05-06 00:08:41 +00:00
|
|
|
PROJECT_LABEL "Library: NeL Misc")
|
|
|
|
|
2010-06-26 14:47:36 +00:00
|
|
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
IF(WIN32)
|
|
|
|
SET_TARGET_PROPERTIES(nelmisc PROPERTIES
|
|
|
|
DEBUG_POSTFIX "_d"
|
|
|
|
RELEASE_POSTFIX "_r")
|
|
|
|
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2010-06-26 15:38:45 +00:00
|
|
|
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|