Move osrm-components to BUILD_COMPONENTS flag

This commit is contained in:
Patrick Niklaus 2016-03-30 22:50:32 +02:00
parent 5c8b7542d0
commit 7174baa91e

View File

@ -32,6 +32,7 @@ endif()
option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON) option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON)
option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF) option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF)
option(BUILD_TOOLS "Build OSRM tools" OFF) option(BUILD_TOOLS "Build OSRM tools" OFF)
option(BUILD_COMPONENTS "Build OSRM tools" ON)
option(ENABLE_ASSERTIONS OFF) option(ENABLE_ASSERTIONS OFF)
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
@ -344,8 +345,7 @@ target_link_libraries(rtree-bench ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} $
target_link_libraries(util-tests ${UTIL_LIBRARIES}) target_link_libraries(util-tests ${UTIL_LIBRARIES})
target_link_libraries(library-tests osrm ${Boost_LIBRARIES}) target_link_libraries(library-tests osrm ${Boost_LIBRARIES})
if(BUILD_TOOLS) if(BUILD_COMPONENTS)
message(STATUS "Activating OSRM internal tools")
find_package(GDAL) find_package(GDAL)
if(GDAL_FOUND) if(GDAL_FOUND)
add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-components src/tools/components.cpp $<TARGET_OBJECTS:UTIL>)
@ -356,6 +356,10 @@ if(BUILD_TOOLS)
else() else()
message(WARNING "libgdal and/or development headers not found") message(WARNING "libgdal and/or development headers not found")
endif() endif()
endif()
if(BUILD_TOOLS)
message(STATUS "Activating OSRM internal tools")
add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-io-benchmark src/tools/io-benchmark.cpp $<TARGET_OBJECTS:UTIL>)
target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES}) target_link_libraries(osrm-io-benchmark ${Boost_LIBRARIES})
add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>) add_executable(osrm-unlock-all src/tools/unlock_all_mutexes.cpp $<TARGET_OBJECTS:UTIL>)