Skip to content

Commit

Permalink
Set python module suffix per platform
Browse files Browse the repository at this point in the history
  • Loading branch information
meshula authored and nickrasmussen committed Aug 8, 2018
1 parent 32723d8 commit 39b9edf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions PyIlmBase/PyIex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ ADD_LIBRARY ( iexmodule ${LIB_TYPE}
iexmodule.cpp
)

SET_TARGET_PROPERTIES ( iexmodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
if (WIN32)
SET_TARGET_PROPERTIES ( iexmodule
PROPERTIES
PREFIX ""
OUTPUT_NAME "iex"
SUFFIX ".pyd"
)
else()
SET_TARGET_PROPERTIES ( iexmodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
endif()

TARGET_LINK_LIBRARIES ( iexmodule
PyIex
Expand Down
15 changes: 12 additions & 3 deletions PyIlmBase/PyImath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,18 @@ ADD_LIBRARY ( imathmodule ${LIB_TYPE}
PyImathBasicTypes.cpp
)

SET_TARGET_PROPERTIES ( imathmodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
if (WIN32)
SET_TARGET_PROPERTIES ( imathmodule
PROPERTIES
PREFIX ""
OUTPUT_NAME "imath"
SUFFIX ".pyd"
)
else()
SET_TARGET_PROPERTIES ( imathmodule
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON
)
endif()

TARGET_LINK_LIBRARIES ( imathmodule
PyImath
Expand Down

0 comments on commit 39b9edf

Please sign in to comment.