Commit 69215a98 authored by seanyen's avatar seanyen

Corrected PYTHON_EXT_SUFFIX usage.

parent d337648b
......@@ -130,11 +130,6 @@ SET(${PROJECT_NAME}_SOURCES
)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
SET(LIB_${PROJECT_NAME}_SUFFIX ${PYTHON_EXT_SUFFIX})
IF(APPLE)
STRING(REPLACE ".so" ".dylib" LIB_${PROJECT_NAME}_SUFFIX ${LIB_${PROJECT_NAME}_SUFFIX})
ENDIF(APPLE)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SUFFIX "${LIB_${PROJECT_NAME}_SUFFIX}")
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-bigobj>)
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
......
......@@ -32,12 +32,7 @@ TARGET_LINK_BOOST_PYTHON(${PYWRAP})
SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB})
SET_PROPERTY(TARGET ${PYWRAP} PROPERTY LINKER_LANGUAGE CXX)
IF(APPLE)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ".so")
ELSEIF(WIN32)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ".pyd")
ENDIF(APPLE)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX})
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}")
......
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