forked from AcademySoftwareFoundation/openexr
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70b40cf
commit a205b29
Showing
8 changed files
with
229 additions
and
101 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | ||
|
||
PROJECT (pyilmbase) | ||
|
||
SET(ILMBASE_VERSION_MAJOR "2") | ||
SET(ILMBASE_VERSION_MINOR "2") | ||
SET(ILMBASE_VERSION_PATCH "0") | ||
|
||
SET(ILMBASE_VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH}) | ||
SET(ILMBASE_VERSION_API ${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR}) | ||
|
||
|
||
# enable the tests | ||
ENABLE_TESTING() | ||
|
||
|
||
# distro building | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${ILMBASE_VERSION_MAJOR}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${ILMBASE_VERSION_MINOR}") | ||
SET(CPACK_PACKAGE_VERSION_PATCH "${ILMBASE_VERSION_PATCH}") | ||
SET(CPACK_SOURCE_GENERATOR "TGZ") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME | ||
"${CMAKE_PROJECT_NAME}-${ILMBASE_VERSION}" | ||
) | ||
set(CPACK_SOURCE_IGNORE_FILES | ||
"/.git*;/.cvs*;${CPACK_SOURCE_IGNORE_FILES}") | ||
INCLUDE ( CPack ) | ||
|
||
# Set this option to find the C++ libs with their namespaced versions | ||
# The python modules themselves are built without versioning | ||
OPTION (NAMESPACE_VERSIONING "Use Namespace Versioning" ON) | ||
|
||
# Setup osx rpathing | ||
SET (CMAKE_MACOSX_RPATH 1) | ||
SET (BUILD_WITH_INSTALL_RPATH 1) | ||
|
||
SET (LIB_TYPE SHARED) | ||
|
||
FIND_PACKAGE ( PythonLibs REQUIRED ) | ||
FIND_PACKAGE ( PythonInterp REQUIRED ) | ||
FIND_PACKAGE ( Boost | ||
COMPONENTS Python | ||
) | ||
FIND_PACKAGE ( NumPy ) | ||
|
||
INCLUDE_DIRECTORIES ( | ||
${ILMBASE_PACKAGE_PREFIX}/include/OpenEXR | ||
PyIex | ||
PyImath | ||
PyImathNumpy | ||
${PYTHON_INCLUDE_PATH} | ||
) | ||
|
||
LINK_DIRECTORIES ( ${ILMBASE_PACKAGE_PREFIX}/lib ) | ||
MESSAGE ( "ILMBASE_PACKAGE_PREFIX = " ${ILMBASE_PACKAGE_PREFIX}) | ||
|
||
|
||
SET (ILMBASE_LIBSUFFIX "") | ||
IF (NAMESPACE_VERSIONING) | ||
SET ( ILMBASE_LIBSUFFIX "-${ILMBASE_VERSION_API}" ) | ||
ENDIF () | ||
|
||
########################## | ||
ADD_SUBDIRECTORY ( PyIex ) | ||
ADD_SUBDIRECTORY ( PyImath ) | ||
|
||
IF (NUMPY_FOUND) | ||
ADD_SUBDIRECTORY ( PyImathNumpy ) | ||
ADD_SUBDIRECTORY ( PyImathNumpyTest ) | ||
ENDIF () | ||
|
||
########################## | ||
# Tests | ||
########################## | ||
ADD_SUBDIRECTORY ( PyIexTest ) | ||
ADD_SUBDIRECTORY ( PyImathTest ) | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
ADD_LIBRARY ( PyIex ${LIB_TYPE} | ||
PyIex.cpp | ||
) | ||
|
||
TARGET_LINK_LIBRARIES ( PyIex | ||
${PYTHON_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS PyIex | ||
DESTINATION | ||
lib | ||
) | ||
|
||
ADD_LIBRARY ( iexmodule ${LIB_TYPE} | ||
iexmodule.cpp | ||
) | ||
|
||
SET_TARGET_PROPERTIES ( iexmodule | ||
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON | ||
) | ||
|
||
TARGET_LINK_LIBRARIES ( iexmodule | ||
PyIex | ||
Iex${ILMBASE_LIBSUFFIX} | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS iexmodule | ||
DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages | ||
) | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ADD_TEST ( PyIexTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyIexTest.in | ||
) |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
ADD_LIBRARY ( PyImath ${LIB_TYPE} | ||
PyImath.cpp | ||
PyImathAutovectorize.cpp | ||
PyImathBox2Array.cpp | ||
PyImathBox3Array.cpp | ||
PyImathBox.cpp | ||
PyImathColor3.cpp | ||
PyImathColor4.cpp | ||
PyImathEuler.cpp | ||
PyImathFixedArray.cpp | ||
PyImathFrustum.cpp | ||
PyImathLine.cpp | ||
PyImathMatrix33.cpp | ||
PyImathMatrix44.cpp | ||
PyImathPlane.cpp | ||
PyImathQuat.cpp | ||
PyImathRandom.cpp | ||
PyImathShear.cpp | ||
PyImathStringArray.cpp | ||
PyImathStringTable.cpp | ||
PyImathTask.cpp | ||
PyImathUtil.cpp | ||
PyImathFixedVArray.cpp | ||
PyImathVec2fd.cpp | ||
PyImathVec2si.cpp | ||
PyImathVec3fd.cpp | ||
PyImathVec3siArray.cpp | ||
PyImathVec3si.cpp | ||
PyImathVec4fd.cpp | ||
PyImathVec4siArray.cpp | ||
PyImathVec4si.cpp | ||
|
||
) | ||
|
||
TARGET_LINK_LIBRARIES ( PyImath | ||
Iex${ILMBASE_LIBSUFFIX} | ||
IexMath${ILMBASE_LIBSUFFIX} | ||
Imath${ILMBASE_LIBSUFFIX} | ||
${Boost_LIBRARIES} | ||
${PYTHON_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS PyImath | ||
DESTINATION | ||
lib | ||
) | ||
|
||
ADD_LIBRARY ( imathmodule ${LIB_TYPE} | ||
imathmodule.cpp | ||
PyImathFun.cpp | ||
PyImathBasicTypes.cpp | ||
) | ||
|
||
SET_TARGET_PROPERTIES ( imathmodule | ||
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON | ||
) | ||
|
||
TARGET_LINK_LIBRARIES ( imathmodule | ||
PyImath | ||
PyIex | ||
Imath${ILMBASE_LIBSUFFIX} | ||
Iex${ILMBASE_LIBSUFFIX} | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS imathmodule | ||
DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages | ||
) | ||
|
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
ADD_LIBRARY ( imathnumpymodule ${LIB_TYPE} | ||
imathnumpymodule.cpp | ||
) | ||
|
||
SET_TARGET_PROPERTIES ( imathnumpymodule | ||
PROPERTIES PREFIX "" SUFFIX ".so" BUILD_WITH_INSTALL_RPATH ON | ||
) | ||
|
||
INCLUDE_DIRECTORIES ( | ||
${NUMPY_INCLUDE_DIRS} | ||
) | ||
|
||
TARGET_LINK_LIBRARIES ( imathnumpymodule | ||
PyImath | ||
PyIex | ||
Imath${ILMBASE_LIBSUFFIX} | ||
Iex${ILMBASE_LIBSUFFIX} | ||
${Boost_LIBRARIES} | ||
) | ||
|
||
INSTALL ( TARGETS imathnumpymodule | ||
DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages | ||
) | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ADD_TEST ( PyImathMumpyTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathMumpyTest.in | ||
) |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ADD_TEST ( PyImathTest | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pyImathTest.in | ||
) |
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