2010-05-06 00:08:41 +00:00
|
|
|
FILE(GLOB SRC *.cpp *.h config_file/*.cpp config_file/*.h)
|
2010-09-19 16:49:03 +00:00
|
|
|
FILE(GLOB HEADERS ../../include/nel/misc/*.h)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
2010-09-19 16:49:03 +00:00
|
|
|
NL_TARGET_LIB(nelmisc ${HEADERS} ${SRC})
|
2010-05-06 00:08:41 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2010-09-09 12:20:18 +00:00
|
|
|
IF(WITH_STATIC OR WIN32)
|
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${PNG_LIBRARIES})
|
|
|
|
ELSE(WITH_STATIC OR WIN32)
|
|
|
|
# Link only with libpng shared library
|
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${PNG_LIBRARY})
|
|
|
|
ENDIF(WITH_STATIC OR WIN32)
|
|
|
|
|
2010-07-23 15:41:49 +00:00
|
|
|
# For DirectInput (di_event_emitter)
|
|
|
|
IF(WIN32)
|
|
|
|
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
2010-09-09 12:20:18 +00:00
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
2010-07-23 15:41:49 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2010-09-09 12:20:18 +00:00
|
|
|
IF(UNIX)
|
2010-09-12 11:41:47 +00:00
|
|
|
TARGET_LINK_LIBRARIES(nelmisc -lc -ldl)
|
2010-09-09 12:20:18 +00:00
|
|
|
IF(NOT APPLE)
|
2010-09-11 17:44:22 +00:00
|
|
|
TARGET_LINK_LIBRARIES(nelmisc -lrt)
|
2010-09-09 12:20:18 +00:00
|
|
|
ENDIF(NOT APPLE)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2010-05-06 00:08:41 +00:00
|
|
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${PNG_INCLUDE_DIR} config_file)
|
2010-09-01 21:30:06 +00:00
|
|
|
|
2010-09-11 17:44:22 +00:00
|
|
|
TARGET_LINK_LIBRARIES(nelmisc ${CMAKE_THREAD_LIBS_INIT} ${LIBXML2_LIBRARIES})
|
2010-09-01 21:30:06 +00:00
|
|
|
SET_TARGET_PROPERTIES(nelmisc PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
2010-09-03 14:02:04 +00:00
|
|
|
NL_DEFAULT_PROPS(nelmisc "NeL, Library: NeL Misc")
|
2010-09-20 20:02:35 +00:00
|
|
|
NL_ADD_RUNTIME_FLAGS(nelmisc)
|
2010-07-14 17:13:07 +00:00
|
|
|
|
|
|
|
NL_ADD_LIB_SUFFIX(nelmisc)
|
2010-05-06 00:08:41 +00:00
|
|
|
|
2010-06-30 13:31:31 +00:00
|
|
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
|
|
|
|
2010-09-24 09:32:20 +00:00
|
|
|
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
2010-06-26 15:38:45 +00:00
|
|
|
|
2010-07-14 17:13:07 +00:00
|
|
|
NL_GEN_PC(nel-misc.pc)
|
2010-05-06 00:08:41 +00:00
|
|
|
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|