Skip to content
Snippets Groups Projects
Commit 56e839e2 authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos
Browse files

Honor package order on main and config

parent 4805b108
No related branches found
No related tags found
1 merge request!49Resolve "Finish installation and usage instruction on the documentation"
......@@ -31,8 +31,17 @@ option(DUNE_COPASI_COMPILE_3D
# make sure to find our own cmake modules
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
# find dependencies
# find dune dependencies
find_package(dune-common REQUIRED)
# include macros for dune projects
list(APPEND CMAKE_MODULE_PATH "${dune-common_MODULE_PATH}")
include(DuneMacros)
# start a dune project with information from dune.module, and find dune dependencies
dune_project()
# find specific dune-copasi dependencies
find_package(muparser REQUIRED)
find_package(TIFF REQUIRED)
find_package(Filesystem)
......@@ -66,13 +75,6 @@ if(USE_FALLBACK_FILESYSTEM)
endif()
endif()
# include macros for dune projects
list(APPEND CMAKE_MODULE_PATH "${dune-common_MODULE_PATH}")
include(DuneMacros)
# start a dune project with information from dune.module, and find dune dependencies
dune_project()
# create main target
add_library(dune-copasi)
set_target_properties(dune-copasi PROPERTIES LIBRARY_OUTPUT_NAME dunecopasi)
......
......@@ -28,15 +28,6 @@ if(NOT dune-copasi_FOUND)
# setup dependencies
find_dependency(dune-common)
find_dependency(muparser)
find_dependency(TIFF)
if(@USE_FALLBACK_FILESYSTEM@)
find_dependency(ghc_filesystem REQUIRED)
else()
find_dependency(Filesystem REQUIRED)
endif()
cmake_policy(POP)
# make sure to find cmake modules for dune-common
list(APPEND CMAKE_MODULE_PATH "${dune-common_MODULE_PATH}")
......@@ -64,6 +55,16 @@ if(NOT dune-copasi_FOUND)
# make sure to find cmake modules for dune-copasi
list(APPEND CMAKE_MODULE_PATH "${dune-copasi_MODULE_PATH}")
find_dependency(muparser)
find_dependency(TIFF)
if(@USE_FALLBACK_FILESYSTEM@)
find_dependency(ghc_filesystem REQUIRED)
else()
find_dependency(Filesystem REQUIRED)
endif()
cmake_policy(POP)
# import targets
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${_dir}/dune-copasi-targets.cmake")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment