31 lines
1.1 KiB
CMake
31 lines
1.1 KiB
CMake
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
FILE(GLOB LIB_SRC *.cpp *.h)
|
|
|
|
LIST(REMOVE_ITEM LIB_SRC ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp)
|
|
|
|
NL_TARGET_LIB(ryzom_sevenzip ${LIB_SRC})
|
|
TARGET_LINK_LIBRARIES(ryzom_sevenzip nelmisc)
|
|
NL_DEFAULT_PROPS(ryzom_sevenzip "Ryzom, Library: Seven Zip")
|
|
NL_ADD_RUNTIME_FLAGS(ryzom_sevenzip)
|
|
NL_ADD_LIB_SUFFIX(ryzom_sevenzip)
|
|
|
|
ADD_DEFINITIONS(-DUNICODE -D_UNICODE -D_7ZIP_PPMD_SUPPPORT)
|
|
|
|
IF(WITH_PCH)
|
|
ADD_NATIVE_PRECOMPILED_HEADER(ryzom_sevenzip ${CMAKE_CURRENT_SOURCE_DIR}/Precomp.h ${CMAKE_CURRENT_SOURCE_DIR}/Precomp.cpp)
|
|
ENDIF()
|
|
|
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
|
INSTALL(TARGETS ryzom_sevenzip LIBRARY DESTINATION ${RYZOM_LIB_PREFIX} ARCHIVE DESTINATION ${RYZOM_LIB_PREFIX} COMPONENT libraries)
|
|
ENDIF()
|
|
|
|
IF(WITH_RYZOM_TOOLS)
|
|
ADD_EXECUTABLE(7zDec ${CMAKE_CURRENT_SOURCE_DIR}/7zMain.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(7zDec ryzom_sevenzip)
|
|
NL_DEFAULT_PROPS(7zDec "Ryzom, Tools, Misc: Seven Zip Decoder")
|
|
NL_ADD_RUNTIME_FLAGS(7zDec)
|
|
|
|
INSTALL(TARGETS 7zDec RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools)
|
|
ENDIF()
|