Skip to content
Snippets Groups Projects
Commit 02a14e5c authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : include order

parent 00980b2e
No related branches found
No related tags found
3 merge requests!93Release v0.3.0,!64Feat/release pip,!58Draft: Feat/release pip
Pipeline #45017 waiting for manual action
......@@ -30,9 +30,6 @@ if(CMAKE_COMPILER_IS_GNUCXX AND COVERAGE)
Include(CodeCoverage)
endif()
##############################################
# Find system dependencies
find_package(aidge_core REQUIRED)
##############################################
# Create target and set properties
......@@ -42,6 +39,23 @@ file(GLOB_RECURSE inc_files "include/*.hpp")
##############################################
# creating library
add_library(${module_name} ${src_files} ${inc_files})
# PYTHON BINDING
if (PYBIND)
find_package(Python REQUIRED)
if (${Python_VERSION_MAJOR} LESS 3)
MESSAGE(FATAL_ERROR "Unsupported Python version. Python 3.0.0+ is required")
endif()
generate_python_binding(${project} ${module_name})
# Handles Python + pybind11 headers dependencies
target_link_libraries(${module_name}
PUBLIC
pybind11::pybind11
)
endif()
##############################################
# Find aidge dependencies
find_package(aidge_core REQUIRED)
target_link_libraries(${module_name}
PUBLIC
_aidge_core # _ is added because we link the target not the project
......@@ -71,20 +85,6 @@ target_include_directories(${module_name}
${CMAKE_CURRENT_SOURCE_DIR}/src
)
# PYTHON BINDING
if (PYBIND)
find_package(Python REQUIRED)
if (${Python_VERSION_MAJOR} LESS 3)
MESSAGE(FATAL_ERROR "Unsupported Python version. Python 3.0.0+ is required")
endif()
generate_python_binding(${project} ${module_name})
# Handles Python + pybind11 headers dependencies
target_link_libraries(${module_name}
PUBLIC
pybind11::pybind11
)
endif()
target_link_libraries(${module_name} PUBLIC fmt::fmt)
target_compile_features(${module_name} PRIVATE cxx_std_14)
......
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