From 311ebb0485a253445c7324b3d42eaadd01ceb8b4 Mon Sep 17 00:00:00 2001 From: Kimball Thurston Date: Sat, 24 Aug 2019 11:22:38 +1200 Subject: [PATCH] Disable the debug postfix for the python modules 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 --- PyIlmBase/PyImathNumpy/CMakeLists.txt | 2 ++ PyIlmBase/config/ModuleDefine.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/PyIlmBase/PyImathNumpy/CMakeLists.txt b/PyIlmBase/PyImathNumpy/CMakeLists.txt index e763d46041..7a70f0698c 100644 --- a/PyIlmBase/PyImathNumpy/CMakeLists.txt +++ b/PyIlmBase/PyImathNumpy/CMakeLists.txt @@ -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() @@ -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() diff --git a/PyIlmBase/config/ModuleDefine.cmake b/PyIlmBase/config/ModuleDefine.cmake index 6f1c964651..d7564c24e3 100644 --- a/PyIlmBase/config/ModuleDefine.cmake +++ b/PyIlmBase/config/ModuleDefine.cmake @@ -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() @@ -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()