-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with rpath, message cleanup, checkpoint better python layer
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
- Loading branch information
Showing
18 changed files
with
455 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ missing | |
.DS_Store | ||
*.project | ||
*.cproject | ||
build/ | ||
build-win/ | ||
build-nuget/ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,15 @@ | ||
|
||
# can't re-use compile, so no sense for object library here... | ||
|
||
if(TARGET Python2::Python AND TARGET Boost::${PYILMBASE_BOOST_PY2_COMPONENT}) | ||
Python2_add_library(iexmodule_p2 MODULE PyIex.cpp iexmodule.cpp) | ||
target_link_libraries(iexmodule_p2 | ||
PRIVATE IlmBase::Iex IlmBase::IexMath | ||
PRIVATE Boost::${PYILMBASE_BOOST_PY2_COMPONENT}) | ||
endif() | ||
|
||
if(TARGET Python3::Python AND TARGET Boost::${PYILMBASE_BOOST_PY3_COMPONENT}) | ||
Python3_add_library(iexmodule_p3 MODULE PyIex.cpp iexmodule.cpp) | ||
target_link_libraries(iexmodule_p3 | ||
PRIVATE IlmBase::Iex IlmBase::IexMath | ||
PRIVATE Boost::${PYILMBASE_BOOST_PY3_COMPONENT}) | ||
endif() | ||
|
||
#[==[ | ||
ADD_LIBRARY ( PyIex ${LIB_TYPE} PyIex.cpp) | ||
|
||
target_compile_definitions( PyIex PRIVATE PYIEX_BUILD ) | ||
|
||
IF (WIN32) | ||
target_compile_definitions( PyIex | ||
PRIVATE OPENEXR_DLL) | ||
ENDIF() | ||
|
||
SET_ILMBASE_INCLUDE_DIRS( PyIex ) | ||
|
||
TARGET_LINK_LIBRARIES ( PyIex | ||
PUBLIC IlmBase::Iex${OPENEXR_TARGET_SUFFIX} | ||
PRIVATE ${PYTHON_LIBRARIES} | ||
PRIVATE ${Boost_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS PyIex | ||
DESTINATION | ||
lib | ||
) | ||
|
||
INSTALL ( | ||
FILES | ||
pyilmbase_define_module(iex | ||
LIBNAME PyIex | ||
PRIV_EXPORT PYIEX_BUILD | ||
CURDIR ${CMAKE_CURRENT_SOURCE_DIR} | ||
LIBSOURCE | ||
PyIex.cpp | ||
MODSOURCE | ||
iexmodule.cpp | ||
HEADERS | ||
PyIex.h | ||
PyIexExport.h | ||
PyIexTypeTranslator.h | ||
|
||
DESTINATION | ||
include/OpenEXR | ||
) | ||
|
||
# must be shared | ||
ADD_LIBRARY ( iexmodule SHARED | ||
iexmodule.cpp | ||
) | ||
|
||
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() | ||
|
||
# IlmBase::Iex${OPENEXR_TARGET_SUFFIX} | ||
TARGET_LINK_LIBRARIES ( iexmodule | ||
PyIex | ||
${PYTHON_LIBRARIES} | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
SET_ILMBASE_INCLUDE_DIRS( iexmodule ) | ||
|
||
INSTALL ( TARGETS iexmodule | ||
DESTINATION lib/python${OPENEXR_PYTHON_MAJOR}.${OPENEXR_PYTHON_MINOR}/site-packages | ||
) | ||
|
||
#]==] | ||
DEPENDENCIES | ||
IlmBase::Iex IlmBase::IexMath | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
ADD_TEST ( PyIexTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyIexTest.in | ||
) | ||
|
||
SET_TESTS_PROPERTIES ( PyIexTest PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/../PyIex;LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/../../IlmBase/Iex:${CMAKE_CURRENT_BINARY_DIR}/../PyIex" ) | ||
if(TARGET Python2::Interpreter) | ||
add_test(PyIlmBase.PyIexTest_Python2 | ||
${Python2_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyIexTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyIexTest_Python2 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python2_VERSION_MAJOR}_${Python2_VERSION_MINOR}" | ||
) | ||
endif() | ||
|
||
if(TARGET Python2::Interpreter) | ||
add_test(PyIlmBase.PyIexTest_Python3 | ||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyIexTest.in | ||
) | ||
set_tests_properties(PyIlmBase.PyIexTest_Python3 PROPERTIES | ||
ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}" | ||
) | ||
endif() |
Oops, something went wrong.