Commit 5ced7a97 authored by laurent.belcour@gmail.com's avatar laurent.belcour@gmail.com Committed by Laurent Belcour

[CMake] Correction of the python dll extension on Windows.

parent 9eb6b314
......@@ -197,6 +197,10 @@ endif()
# Python bindings
if(PYTHONLIBS_FOUND AND PYBIND_FOUND)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/python)
# Note: Required on windows to build the python dll in the 'python'
# directory. [Laurent] I have no idea why this is needed.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/python)
include_directories(${PYTHON_INCLUDE_DIRS})
add_library(alta SHARED sources/python/alta.cpp)
target_link_libraries(alta core ${PYTHON_LIBRARIES})
......@@ -204,6 +208,9 @@ if(PYTHONLIBS_FOUND AND PYBIND_FOUND)
if(APPLE)
set_target_properties(alta PROPERTIES SUFFIX ".so")
endif()
if(WIN32)
set_target_properties(alta PROPERTIES SUFFIX ".pyd")
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment