Skip to content

Commit

Permalink
Disable the debug postfix for the python modules
Browse files Browse the repository at this point in the history
If we are building a debug configuration, make the python modules still
output their base name instead of imath_d.so or whatever, otherwise
import does not work.

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Aug 27, 2019
1 parent bdedcc6 commit 311ebb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PyIlmBase/PyImathNumpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if(TARGET Python2::Python AND
set_target_properties(imathnumpy_python2 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}/"
LIBRARY_OUTPUT_NAME "imathnumpy"
DEBUG_POSTFIX ""
)
endif()

Expand All @@ -46,5 +47,6 @@ if(TARGET Python3::Python AND
set_target_properties(imathnumpy_python3 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}/"
LIBRARY_OUTPUT_NAME "imathnumpy"
DEBUG_POSTFIX ""
)
endif()
2 changes: 2 additions & 0 deletions PyIlmBase/config/ModuleDefine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ function(PYILMBASE_DEFINE_MODULE modname)
set_target_properties(${modname}_python2 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}/"
LIBRARY_OUTPUT_NAME "${modname}"
DEBUG_POSTFIX ""
)
#### TODO: Define installation rules
endif()
Expand All @@ -143,6 +144,7 @@ function(PYILMBASE_DEFINE_MODULE modname)
set_target_properties(${modname}_python3 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}/"
LIBRARY_OUTPUT_NAME "${modname}"
DEBUG_POSTFIX ""
)
#### TODO: Define installation rules
endif()
Expand Down

0 comments on commit 311ebb0

Please sign in to comment.