Skip to content

Commit bb974a7

Browse files
committed
Switch to the limited api with a multi-phase init because I have an example
1 parent 09ce2c7 commit bb974a7

File tree

3 files changed

+199
-167
lines changed

3 files changed

+199
-167
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
cmake_minimum_required(VERSION 3.16)
1+
cmake_minimum_required(VERSION 3.26)
22

33
project(simplex VERSION 1.0 DESCRIPTION "Blur Studio's Simplex Blendshape Combination System" LANGUAGES CXX)
44

55
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
6-
set(CMAKE_CXX_STANDARD 14)
6+
set(CMAKE_CXX_STANDARD 20)
77

88
# (defined in FindMaya.cmake, copied here for reference)
99
# set(MAYA_INSTALL_BASE_PATH "" CACHE STRING

src/python/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ if(${PY_MAJOR} STREQUAL "2")
8484
elseif(${PY_MAJOR} STREQUAL "3")
8585
set(PY_NAME pysimplex)
8686
message("FIND PKG Python3 ${_PY_VERSION} EXACT REQUIRED COMPONENTS Development")
87-
find_package(Python3 ${_PY_VERSION} EXACT REQUIRED COMPONENTS Development)
88-
set(PY_MODULE Python3::Module)
87+
find_package(Python3 ${_PY_VERSION} EXACT REQUIRED COMPONENTS Development.SABIModule)
88+
set(PY_MODULE Python3::SABIModule)
8989
# Auto-handles the .pyd and .so stuff
90-
Python3_add_library(${PY_NAME} MODULE ${PY_FILES})
90+
set(_PY_MM ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})
91+
Python3_add_library(${PY_NAME} MODULE USE_SABI ${_PY_MM} ${PY_FILES})
9192
endif()
9293

9394
# Link to python

0 commit comments

Comments
 (0)