2010-05-06 00:08:41 +00:00
|
|
|
FILE(GLOB SRC "*.cpp")
|
|
|
|
FILE(GLOB NET_MANAGER "net_manager.*")
|
|
|
|
LIST(REMOVE_ITEM SRC ${NET_MANAGER})
|
|
|
|
|
|
|
|
DECORATE_NEL_LIB("nelmisc")
|
|
|
|
SET(NLMISC_LIB ${LIBNAME})
|
|
|
|
DECORATE_NEL_LIB("nelnet")
|
|
|
|
SET(NLNET_LIB ${LIBNAME})
|
|
|
|
|
|
|
|
IF(NOT WIN32)
|
|
|
|
ADD_LIBRARY(nelnet SHARED ${SRC})
|
2010-06-09 16:09:56 +00:00
|
|
|
CONFIGURE_FILE(nel-net.pc.in nel-net.pc)
|
2010-06-09 21:35:55 +00:00
|
|
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/nel-net.pc" DESTINATION lib/pkgconfig)
|
2010-05-06 00:08:41 +00:00
|
|
|
ELSE(NOT WIN32)
|
|
|
|
ADD_LIBRARY(nelnet STATIC ${SRC})
|
|
|
|
ENDIF(NOT WIN32)
|
|
|
|
|
|
|
|
IF(WITH_GTK)
|
|
|
|
IF(GTK2_FOUND)
|
|
|
|
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
|
|
|
|
ADD_DEFINITIONS(-DNL_USE_GTK)
|
|
|
|
ENDIF(GTK2_FOUND)
|
|
|
|
ENDIF(WITH_GTK)
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
|
|
|
|
TARGET_LINK_LIBRARIES(nelnet ${LIBXML2_LIBRARIES} ${NLMISC_LIB})
|
2010-06-14 08:30:17 +00:00
|
|
|
SET_TARGET_PROPERTIES(nelnet 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 Net")
|
|
|
|
|
|
|
|
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
|
|
|
|
LINK_FLAGS "/NODEFAULTLIB:libcmt"
|
|
|
|
DEBUG_POSTFIX "_d"
|
|
|
|
RELEASE_POSTFIX "_r")
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
|
|
|
|
|
|
|
INSTALL(TARGETS ${NLNET_LIB} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|