Commit a09e1a31 authored by yannick legoc's avatar yannick legoc
Browse files

Merge branch 'cameopy_name' into 'master'

fixing cameopy name and location to debian defaults

See merge request !7
parents 3aa4c28d d03e8f90
cmake_minimum_required(VERSION 3.12.0) cmake_minimum_required(VERSION 3.12.0)
# Project name and version # Project name and version
project(cameo-api-python project(cameopy
VERSION 1.0.0 VERSION 1.0.0
LANGUAGES CXX LANGUAGES CXX
HOMEPAGE_URL "https://code.ill.fr/cameo/cameo" HOMEPAGE_URL "https://code.ill.fr/cameo/cameo"
...@@ -23,6 +23,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cameo-api-cpp/) ...@@ -23,6 +23,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cameo-api-cpp/)
#message(STATUS ${CMAKE_MODULE_PATH}) #message(STATUS ${CMAKE_MODULE_PATH})
find_package(cameo-api-cpp-static 1.1.0 REQUIRED) # provided by the C++ API find_package(cameo-api-cpp-static 1.1.0 REQUIRED) # provided by the C++ API
find_package(pybind11 2.4.3 QUIET) find_package(pybind11 2.4.3 QUIET)
find_package (Python REQUIRED)
if(NOT pybind11_FOUND) if(NOT pybind11_FOUND)
message(WARNING "Using pybind11 from GIT repository") message(WARNING "Using pybind11 from GIT repository")
FetchContent_Declare(pybind11 FetchContent_Declare(pybind11
...@@ -64,9 +65,8 @@ if(WIN32) ...@@ -64,9 +65,8 @@ if(WIN32)
"${CMAKE_INSTALL_LIBDIR}/site-packages" "${CMAKE_INSTALL_LIBDIR}/site-packages"
) )
else() else()
set(CMAKE_INSTALL_PYTHONDIR_DEFAULT file(RELATIVE_PATH CMAKE_INSTALL_PYTHONDIR_DEFAULT "/usr/" ${Python_SITELIB})
"${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages" # "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages"
)
endif() endif()
set(CMAKE_INSTALL_PYTHONDIR "${CMAKE_INSTALL_PYTHONDIR_DEFAULT}" set(CMAKE_INSTALL_PYTHONDIR "${CMAKE_INSTALL_PYTHONDIR_DEFAULT}"
CACHE STRING "Location for installed python package" CACHE STRING "Location for installed python package"
......
set(CPACK_PACKAGE_NAME cameo-api-python)
set(CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON) set(CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON)
set(CPACK_PACKAGE_CHECKSUM MD5) set(CPACK_PACKAGE_CHECKSUM MD5)
......
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