FILE(GLOB SRC *.cpp *.h) FILE(GLOB LIB_SRC *.cpp *.h) LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp) ADD_EXECUTABLE(7zDec ${SRC}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) TARGET_LINK_LIBRARIES(7zDec ${PLATFORM_LINKFLAGS}) IF(NOT WIN32) ADD_LIBRARY(ryzom_sevenzip SHARED ${LIB_SRC}) ELSE(NOT WIN32) ADD_LIBRARY(ryzom_sevenzip STATIC ${LIB_SRC}) ENDIF(NOT WIN32) TARGET_LINK_LIBRARIES(ryzom_sevenzip ${PLATFORM_LINKFLAGS}) SET_TARGET_PROPERTIES(ryzom_sevenzip PROPERTIES VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR}) IF(WIN32) SET_TARGET_PROPERTIES(ryzom_sevenzip PROJECT_LABEL "Library: Seven Zip" DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r" LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt") ENDIF(WIN32) ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) INSTALL(TARGETS 7zDec RUNTIME DESTINATION bin COMPONENT client)