Commit 3ce2c29e authored by Edwin Carlinet's avatar Edwin Carlinet
Browse files

Upgrade CMakeLists and conan_files to modernize.

parent 01518ab1
......@@ -14,7 +14,6 @@ find_package(Boost 1.58 COMPONENTS program_options REQUIRED)
find_package(FreeImage REQUIRED)
find_package(TBB)
find_package(Qt4)
find_package(range-v3 REQUIRED)
# CONFIGURE COMPILER LAUNCHERS
......
......@@ -43,8 +43,8 @@ target_link_libraries(Pylene PRIVATE FreeImage::FreeImage)
# Set sources
file(GLOB_RECURSE sources "include/mln/*.hpp")
target_sources(Pylene INTERFACE $<BUILD_INTERFACE:${sources}>)
#file(GLOB_RECURSE sources "include/mln/*.hpp")
#target_sources(Pylene INTERFACE $<BUILD_INTERFACE:${sources}>)
target_sources(Pylene PRIVATE
src/core/se/disc.cpp
......@@ -93,11 +93,9 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/mln FILES ${sources})
add_library(Pylene::Pylene ALIAS Pylene)
include(GNUInstallDirs)
install(TARGETS Pylene
EXPORT PyleneTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include)
EXPORT PyleneTargets)
write_basic_package_version_file(
PyleneConfigVersion.cmake
......@@ -114,15 +112,16 @@ configure_file(
install(EXPORT PyleneTargets
FILE PyleneTargets.cmake
NAMESPACE Pylene::
DESTINATION lib/cmake/pylene
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pylene
)
install(DIRECTORY include/mln
DESTINATION include)
TYPE INCLUDE)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/PyleneConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/PyleneConfigVersion.cmake
DESTINATION lib/cmake/pylene)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pylene)
# GCC8 has enoying random compilation failures
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
......
include(CMakeFindDependencyMacro)
find_dependency(Boost 1.58)
find_dependency(range-v3 0.5.0)
find_dependency(fmt)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.2)
find_dependency(cmcstl2)
endif()
find_dependency(range-v3 0.9.1 CONFIG)
find_dependency(fmt 6.0)
include("${CMAKE_CURRENT_LIST_DIR}/PyleneTargets.cmake")
......@@ -3,7 +3,8 @@ import os
class PyleneTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_paths"
generators = [ "cmake_paths", "cmake_find_package" ]
def build(self):
cmake = CMake(self)
......
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