Пытаюсь подключить компоненты питона следующим образом:
if (ALPHA_USE_MATPLOTLIBCPP)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
target_include_directories(alpha PUBLIC
${Python3_INCLUDE_DIRS}
)
target_link_libraries(alpha INTERFACE
Python3::Python
Python3::Module
)
target_compile_definitions(alpha PRIVATE USE_MATPLOTLIBCPP)
find_package(Python3 COMPONENTS NumPy)
if(Python3_NumPy_FOUND)
target_link_libraries(alpha INTERFACE
Python3::NumPy
)
target_include_directories(alpha PUBLIC
${Python3_NumPy_INCLUDE_DIRS}
)
message("------>> Python3_LIBRARIES = ${Python3_LIBRARIES}")
message("------>> Python3_LIBRARY_DIRS = ${Python3_LIBRARY_DIRS}")
message("------>> Python3_RUNTIME_LIBRARY_DIRS = ${Python3_RUNTIME_LIBRARY_DIRS}")
else()
target_compile_definitions(alpha INTERFACE WITHOUT_NUMPY)
endif()
endif()
В результате переменные находятся:
[CMake] -- Found Python3: C:/Program Files/Python312/python.exe (found version "3.12.3") found components: Interpreter Development Development.Module Development.Embed
[CMake] -- Found Python3: optimized;C:/Program Files/Python312/libs/python312.lib;debug;C:/Program Files/Python312/libs/python312_d.lib (found version "3.12.3") found components: NumPy Interpreter Development.Module
[CMake] ------>> Python3_LIBRARIES = optimized;C:/Program Files/Python312/libs/python312.lib;debug;C:/Program Files/Python312/libs/python312_d.lib
[CMake] ------>> Python3_LIBRARY_DIRS = C:/Program Files/Python312/libs
[CMake] ------>> Python3_RUNTIME_LIBRARY_DIRS = C:/Program Files/Python312
Но при сборке ошибка: Error LNK1104 cannot open file 'python312.lib'
Что я упустил?