May-18-2023, 09:09 AM
To do this in CMake, do this in your CMakeLists.txt file threes:
find_package(Python3 REQUIRED COMPONENTS Development)
include_directories(myProject ${Python3_INCLUDE_DIRS})
target_link_libraries(myProject PRIVATE ${Python3_LIBRARIES})
find_package(Python3 REQUIRED COMPONENTS Development)
include_directories(myProject ${Python3_INCLUDE_DIRS})
target_link_libraries(myProject PRIVATE ${Python3_LIBRARIES})