From 3250ae42b25319af9118d8fd4bcb412c22a9136c Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Sep 2012 12:44:03 +0200 Subject: [PATCH] Changed: Don't compile 7zDec if WITH_RYZOM_TOOLS is disabled --- .../ryzom/client/src/seven_zip/CMakeLists.txt | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/code/ryzom/client/src/seven_zip/CMakeLists.txt b/code/ryzom/client/src/seven_zip/CMakeLists.txt index ba4073783..8cdade76f 100644 --- a/code/ryzom/client/src/seven_zip/CMakeLists.txt +++ b/code/ryzom/client/src/seven_zip/CMakeLists.txt @@ -1,16 +1,9 @@ -FILE(GLOB SRC *.cpp *.h) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) 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}) -NL_DEFAULT_PROPS(7zDec "Ryzom, Tools, Misc: Seven Zip Decoder") -NL_ADD_RUNTIME_FLAGS(7zDec) - NL_TARGET_LIB(ryzom_sevenzip ${LIB_SRC}) # TARGET_LINK_LIBRARIES(ryzom_sevenzip ${PLATFORM_LINKFLAGS}) NL_DEFAULT_PROPS(ryzom_sevenzip "Ryzom, Library: Seven Zip") @@ -21,5 +14,14 @@ ADD_DEFINITIONS(-D_SZ_ONE_DIRECTORY) 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) - INSTALL(TARGETS 7zDec RUNTIME DESTINATION bin COMPONENT client) ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + +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 bin COMPONENT client) +ENDIF(WITH_RYZOM_TOOLS)