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

chore : aidge_install is in the prefix path

parent 27cc9e7e
No related branches found
No related tags found
2 merge requests!93Release v0.3.0,!64Feat/release pip
Pipeline #46631 canceled
...@@ -20,8 +20,6 @@ execute_process( ...@@ -20,8 +20,6 @@ execute_process(
ERROR_QUIET ERROR_QUIET
) )
message(STATUS "Latest git commit: ${GIT_COMMIT_HASH}") message(STATUS "Latest git commit: ${GIT_COMMIT_HASH}")
# Define a preprocessor macro with the Git commit version
add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}") add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}")
# Note : project name is {project} and python module name is also {project} # Note : project name is {project} and python module name is also {project}
...@@ -43,7 +41,6 @@ if(CMAKE_COMPILER_IS_GNUCXX AND COVERAGE) ...@@ -43,7 +41,6 @@ if(CMAKE_COMPILER_IS_GNUCXX AND COVERAGE)
Include(CodeCoverage) Include(CodeCoverage)
endif() endif()
############################################## ##############################################
# Create target and set properties # Create target and set properties
file(GLOB_RECURSE src_files "src/*.cpp") file(GLOB_RECURSE src_files "src/*.cpp")
...@@ -52,20 +49,13 @@ file(GLOB_RECURSE inc_files "include/*.hpp") ...@@ -52,20 +49,13 @@ file(GLOB_RECURSE inc_files "include/*.hpp")
############################################## ##############################################
# creating library # creating library
add_library(${module_name} ${src_files} ${inc_files}) 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 if(NOT $ENV{AIDGE_INSTALL} STREQUAL "")
target_link_libraries(${module_name} set(CMAKE_INSTALL_PREFIX $ENV{AIDGE_INSTALL})
PUBLIC list(APPEND CMAKE_PREFIX_PATH $ENV{AIDGE_INSTALL})
pybind11::pybind11 message(WARNING "Env var AIDGE_INSTALL detected. Set CMAKE_INSTALL_PREFIX & added to CMAKE_PREFIX_PATH = $ENV{AIDGE_INSTALL}")
)
endif() endif()
############################################## ##############################################
# Find aidge dependencies # Find aidge dependencies
find_package(aidge_core REQUIRED) find_package(aidge_core REQUIRED)
...@@ -128,11 +118,6 @@ endif() ...@@ -128,11 +118,6 @@ endif()
############################################## ##############################################
# Installation instructions # Installation instructions
if(NOT $ENV{AIDGE_INSTALL} STREQUAL "")
set(CMAKE_INSTALL_PREFIX $ENV{AIDGE_INSTALL})
message(WARNING "CMAKE_INSTALL_PREFIX set to env variable AIDGE_INSTALL by default = ${CMAKE_INSTALL_PREFIX}")
endif()
include(GNUInstallDirs) include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}) set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})
......
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