Skip to content
This repository has been archived by the owner on Nov 17, 2019. It is now read-only.

Commit

Permalink
use option in cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
apreiml committed Nov 15, 2012
1 parent a4ac0e0 commit 0230557
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions CMakeLists.txt
@@ -1,11 +1,10 @@
# Available settings:
#
# GUTILS_TOOLS:BOOL if true to enable compilation of gutils tools
# GUTILS_TEST:BOOL if true some debug/test classes will be compiled
#

cmake_minimum_required(VERSION 2.8)

# project options

option(GU_TOOLS "build dev tools" OFF)
option(GU_TEST "build test environment" OFF)

set(Genieutils_LIBRARY genieutils)

project(genieutils)
Expand All @@ -23,14 +22,14 @@ set(Boost_USE_STATIC_RUNTIME OFF)
find_package(ZLIB REQUIRED)
find_package(Boost 1.42 COMPONENTS iostreams REQUIRED)

if (GUTILS_TOOLS)
if (GU_TOOLS)
find_package(Boost 1.42 COMPONENTS program_options REQUIRED)
endif(GUTILS_TOOLS)
endif(GU_TOOLS)

if (GUTILS_TEST)
if (GU_TEST)
find_package(Boost 1.42 COMPONENTS unit_test_framework program_options REQUIRED)
# find_package(SFML COMPONENTS SYSTEM WINDOW GRAPHICS REQUIRED)
endif (GUTILS_TEST)
endif (GU_TEST)

find_package(Iconv)

Expand Down Expand Up @@ -157,17 +156,17 @@ target_link_libraries(${Genieutils_LIBRARY} ${ZLIB_LIBRARIES} ${Boost_LIBRARIES}
# Dev tools:
#------------------------------------------------------------------------------#

if (GUTILS_TOOLS)
if (GU_TOOLS)
add_executable(datextract ${EXTRACT_SRC})
target_link_libraries(datextract ${ZLIB_LIBRARIES} ${Boost_LIBRARIES} ${Genieutils_LIBRARY})

add_executable(bincomp ${BINCOMP_SRC})
endif (GUTILS_TOOLS)
endif (GU_TOOLS)

#------------------------------------------------------------------------------#
# Debug/Test:
#------------------------------------------------------------------------------#
if (GUTILS_TEST)
if (GU_TEST)
add_executable(main main.cpp)
target_link_libraries(main ${Genieutils_LIBRARY}
# ${SFML_WINDOW_LIBRARY}
Expand All @@ -186,5 +185,5 @@ if (GUTILS_TEST)
target_link_libraries(tests/dat_test ${Boost_LIBRARIES} ${Genieutils_LIBRARY})

add_test(dat_test ${test_DIR}/dat_test)
endif(GUTILS_TEST)
endif(GU_TEST)

0 comments on commit 0230557

Please sign in to comment.