-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1bd008
commit 3b5ae90
Showing
5 changed files
with
24 additions
and
432 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
cmake_minimum_required(VERSION 3.15...3.26) | ||
|
||
project( | ||
${SKBUILD_PROJECT_NAME} | ||
LANGUAGES C | ||
VERSION ${SKBUILD_PROJECT_VERSION}) | ||
cmake_minimum_required(VERSION 3.26...3.29) | ||
project(${SKBUILD_PROJECT_NAME} LANGUAGES C VERSION ${SKBUILD_PROJECT_VERSION}) | ||
|
||
find_package( | ||
Python | ||
REQUIRED | ||
COMPONENTS | ||
Interpreter | ||
Development.Module | ||
${SKBUILD_SABI_COMPONENT} | ||
NumPy | ||
REQUIRED) | ||
) | ||
|
||
python_add_library(cutils MODULE WITH_SOABI USE_SABI 3.11 src/asammdf/blocks/cutils.c) | ||
|
||
if(DEFINED ENV{LIBDEFLATE_PREFIX}) | ||
message(STATUS "Finding libdeflate in $ENV{LIBDEFLATE_PREFIX}") | ||
target_include_directories(_deflate PUBLIC "$ENV{LIBDEFLATE_PREFIX}/include") | ||
target_link_directories(_deflate PUBLIC "$ENV{LIBDEFLATE_PREFIX}/lib") | ||
target_link_libraries(_deflate PRIVATE deflate) | ||
else() | ||
message(STATUS "Building and linking bundled libdeflate222222") | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
set(LIBDEFLATE_BUILD_SHARED_LIB OFF) | ||
add_subdirectory(libdeflate EXCLUDE_FROM_ALL) | ||
target_link_libraries(cutils PRIVATE libdeflate_static) | ||
endif() | ||
|
||
python_add_library(cutils | ||
MODULE | ||
src/asammdf/blocks/cutils.c | ||
WITH_SOABI USE_SABI 3.9) | ||
|
||
target_link_libraries(cutils PRIVATE Python::NumPy) | ||
|
||
install(TARGETS cutils DESTINATION "asammdf/blocks") | ||
install(TARGETS cutils LIBRARY DESTINATION "asammdf/blocks") |
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
Binary file not shown.
Oops, something went wrong.