...
 
......@@ -131,6 +131,9 @@ target_link_libraries(core ${CMAKE_DL_LIBS})
# set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
# Note: Required on windows to build the plugins in the 'plugins'
# directory. [Laurent] I have no idea why this is needed.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
# Data
alta_add_plugin(data_astm data_io/astm.cpp)
......@@ -194,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})
......@@ -201,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()
......