Commit 7464bf47 authored by Max Lyon's avatar Max Lyon

disable file_converter if boost is not found.

parent 832fcfdb
Pipeline #4116 passed with stage
in 3 minutes and 43 seconds
...@@ -8,15 +8,12 @@ include_directories ( ...@@ -8,15 +8,12 @@ include_directories (
find_package(Boost 1.43.0) find_package(Boost 1.43.0)
if(Boost_FOUND) if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
else()
set (USE_IN_SOURCE_TREE_BOOST true)
endif()
# Add target for first example # Add target for first example
add_executable(file_converter EXCLUDE_FROM_ALL ovm_converter.cc) add_executable(file_converter EXCLUDE_FROM_ALL ovm_converter.cc)
add_dependencies(file_converter OpenVolumeMesh) add_dependencies(file_converter OpenVolumeMesh)
if(NOT WIN32) if(NOT WIN32)
# Link against all necessary libraries # Link against all necessary libraries
target_link_libraries(file_converter OpenVolumeMesh) target_link_libraries(file_converter OpenVolumeMesh)
...@@ -24,9 +21,15 @@ if(NOT WIN32) ...@@ -24,9 +21,15 @@ if(NOT WIN32)
# Set output directory to ${BINARY_DIR}/FileConverter # Set output directory to ${BINARY_DIR}/FileConverter
set_target_properties(file_converter PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/FileConverter) set_target_properties(file_converter PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/FileConverter)
else() else()
# Link against all necessary libraries # Link against all necessary libraries
target_link_libraries(file_converter OpenVolumeMesh) target_link_libraries(file_converter OpenVolumeMesh)
endif()
else()
message("Boost not found. Disabling file_converter.")
endif() endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment