Last active
February 21, 2024 02:32
-
-
Save yashi/2547bb452f315c677be53315fecfd2dc to your computer and use it in GitHub Desktop.
CMakeLists.txt for Python C Extension module
This file contains hidden or 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
cmake_minimum_required(VERSION 3.20) | |
project(python_module) | |
find_package(Python3 COMPONENTS Development.Module) | |
#Python_add_library(hello MODULE hello.c) | |
add_library(hello SHARED hello.c) | |
target_include_directories(hello PRIVATE ${Python_INCLUDE_DIRS}) | |
target_link_libraries(hello Python3::Module) | |
set_target_properties(hello PROPERTIES PREFIX "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment