Commit 5d45a137 authored by Edwin Carlinet's avatar Edwin Carlinet

Fix boost program_options dependancy with conan in doc.

parent c3244ad4
......@@ -20,7 +20,7 @@ if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/conan_paths.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/conan_paths.cmake")
endif ()
find_package(Boost 1.58 COMPONENTS program_options REQUIRED)
find_package(FreeImage REQUIRED)
......
......@@ -16,7 +16,7 @@ class Pylene(ConanFile):
"shared": False,
"fPIC": False,
"gtest:shared": False,
"boost:header_only": True
"boost:shared": True
}
generators = [ "cmake", "cmake_paths", "cmake_find_package" ]
......
add_subdirectory(source/snippets)
find_package(Doxygen)
find_package(Sphinx)
find_package(Boost COMPONENTS program_options REQUIRED)
add_subdirectory(source/snippets)
if(DOXYGEN_FOUND)
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/pylene/include)
......@@ -39,6 +39,5 @@ if(SPHINX_FOUND AND DOXYGEN_FOUND)
DEPENDS build-images build-doxygen ${SPHINX_SOURCES}
COMMENT "Generating Sphinx documentation")
add_dependencies(build-doc build-sphinx)
endif()
......@@ -64,7 +64,14 @@ add_custom_target(build-images
add_library(doc-lib lut.cpp)
target_link_libraries(doc-lib Pylene::Pylene)
link_libraries(${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE} ${FreeImage_LIBRARY})
# for program_options, need to separate CONAN and regular FindBoost
if (TARGET Boost::program_options)
link_libraries(Boost::program_options)
elseif (TARGET CONAN_LIB::Boost_boost_program_options)
link_libraries(CONAN_LIB::Boost_boost_program_options)
endif()
link_libraries(Pylene::Pylene)
link_libraries(doc-lib)
......
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