-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Python * Python packaging fix for Windows
- Loading branch information
Showing
9 changed files
with
266 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
################################################################################ | ||
# | ||
# medInria | ||
# | ||
# Copyright (c) INRIA 2024. All rights reserved. | ||
# See LICENSE.txt for details. | ||
# | ||
# This software is distributed WITHOUT ANY WARRANTY; without even | ||
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
# PURPOSE. | ||
# | ||
################################################################################ | ||
|
||
set(PYTHON_VERSION_MAJOR 3 CACHE STRING "Python major version") | ||
set(PYTHON_VERSION_MINOR 10 CACHE STRING "Python minor version") | ||
set(PYTHON_VERSION_PATCH 10 CACHE STRING "Python patch version") | ||
|
||
function(pyncpp_project) | ||
|
||
set(ep pyncpp) | ||
|
||
EP_Initialisation(${ep} | ||
USE_SYSTEM OFF | ||
BUILD_SHARED_LIBS ON | ||
REQUIRED_FOR_PLUGINS ON | ||
) | ||
|
||
if(NOT USE_SYSTEM_${ep}) | ||
|
||
epComputPath(${ep}) | ||
|
||
set(project_args | ||
GIT_REPOSITORY ${GITHUB_PREFIX}LIRYC-IHU/pyncpp.git | ||
GIT_TAG 0.1.x | ||
GIT_SHALLOW True | ||
GIT_PROGRESS True | ||
) | ||
|
||
set(cmake_args | ||
${ep_common_cache_args} | ||
-D "PYNCPP_PYTHON_VERSION_MAJOR:STRING=${PYTHON_VERSION_MAJOR}" | ||
-D "PYNCPP_PYTHON_VERSION_MINOR:STRING=${PYTHON_VERSION_MINOR}" | ||
-D "PYNCPP_PYTHON_VERSION_PATCH:STRING=${PYTHON_VERSION_PATCH}" | ||
-D "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_ExtProjs}" | ||
) | ||
|
||
if(UNIX) | ||
list(APPEND cmake_args | ||
-D Qt5_DIR:PATH=${Qt5_DIR} | ||
-D OPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR} | ||
) | ||
endif() | ||
|
||
## ##################################################################### | ||
## Add external project | ||
## ##################################################################### | ||
|
||
ExternalProject_Add(${ep} | ||
PREFIX ${EP_PATH_SOURCE} | ||
SOURCE_DIR ${EP_PATH_SOURCE}/${ep} | ||
BINARY_DIR ${build_path} | ||
TMP_DIR ${tmp_path} | ||
STAMP_DIR ${stamp_path} | ||
DEPENDS ${${ep}_dependencies} | ||
CMAKE_ARGS ${cmake_args} | ||
INSTALL_COMMAND "" | ||
"${project_args}" | ||
) | ||
|
||
## ##################################################################### | ||
## Export variables | ||
## ##################################################################### | ||
|
||
set(${ep}_ROOT "${build_path}" PARENT_SCOPE) | ||
|
||
endif() | ||
|
||
endfunction() |