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.
Merge branch 'develop' Conflicts: IlmBase/bootstrap OpenEXR/bootstrap PyIlmBase/bootstrap
- Loading branch information
Showing
264 changed files
with
5,980 additions
and
3,610 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
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,7 +1,24 @@ | ||
# [email protected] | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | ||
|
||
PROJECT ( ILMBase ) | ||
PROJECT ( ilmbase ) | ||
|
||
ENABLE_TESTING() | ||
|
||
SET(CPACK_PACKAGE_VERSION_MAJOR "2") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "1") | ||
SET(CPACK_PACKAGE_VERSION_PATCH "0") | ||
SET(CPACK_SOURCE_GENERATOR "TGZ") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME | ||
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" | ||
) | ||
set(CPACK_SOURCE_IGNORE_FILES | ||
"/.git*;/.cvs*;${CPACK_SOURCE_IGNORE_FILES}") | ||
INCLUDE ( CPack ) | ||
|
||
|
||
# Allow the developer to select if Dynamic or Static libraries are built | ||
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON) | ||
|
||
IF ( NOT WIN32) | ||
ADD_DEFINITIONS ( -pthread ) | ||
|
@@ -59,6 +76,16 @@ MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_valu | |
INSTALL( FILES ${_laname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR}) | ||
ENDMACRO(CREATE_LIBTOOL_FILE) | ||
|
||
SET (LIB_TYPE STATIC) | ||
IF (BUILD_SHARED_LIBS) | ||
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED' | ||
SET (LIB_TYPE SHARED) | ||
IF (WIN32) | ||
ADD_DEFINITIONS(-DOPENEXR_DLL) | ||
ENDIF () | ||
ENDIF (BUILD_SHARED_LIBS) | ||
|
||
|
||
ADD_SUBDIRECTORY ( Half ) | ||
ADD_SUBDIRECTORY ( Iex ) | ||
ADD_SUBDIRECTORY ( IexMath ) | ||
|
@@ -70,36 +97,65 @@ IF (WIN32) | |
DESTINATION ${CMAKE_SOURCE_DIR}/config | ||
) | ||
ELSE () | ||
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_POSIX_SEMAPHORES 1\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_STRING \"2.0.0\"\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_PACKAGE_STRING \"IlmBase 2.0.0\"\n" ) | ||
IF (APPLE) | ||
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" ) | ||
ELSE () | ||
FILE ( WRITE ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_PTHREAD 1\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_LARGE_STACK 1\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define HAVE_POSIX_SEMAPHORES 1\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT 1\n") | ||
ENDIF () | ||
ENDIF () | ||
|
||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 1\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IMATH_INTERNAL_NAMESPACE Imath_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IEX_INTERNAL_NAMESPACE Iex_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IMATH_NAMESPACE Imath\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define IEX_NAMESPACE Iex\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMTHREAD_NAMESPACE IlmThread\n") | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_STRING \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_PACKAGE_STRING \"IlmBase ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR}\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR}\n" ) | ||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h "#define ILMBASE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}\n" ) | ||
|
||
FILE ( APPEND ${CMAKE_SOURCE_DIR}/config/IlmBaseConfig.h " | ||
// Version as a single hex number, e.g. 0x01000300 == 1.0.3 | ||
#define ILMBASE_VERSION_HEX ((ILMBASE_VERSION_MAJOR << 24) | \\ | ||
(ILMBASE_VERSION_MINOR << 16) | \\ | ||
(ILMBASE_VERSION_PATCH << 8)) | ||
") | ||
|
||
|
||
SET_TARGET_PROPERTIES ( Half | ||
PROPERTIES | ||
VERSION 10.0.0 | ||
SOVERSION 10 | ||
VERSION 11.0.0 | ||
SOVERSION 11 | ||
) | ||
SET_TARGET_PROPERTIES ( Iex | ||
PROPERTIES | ||
VERSION 10.0.0 | ||
SOVERSION 10 | ||
VERSION 11.0.0 | ||
SOVERSION 11 | ||
OUTPUT_NAME "Iex-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}" | ||
) | ||
SET_TARGET_PROPERTIES ( Imath | ||
PROPERTIES | ||
VERSION 10.0.0 | ||
SOVERSION 10 | ||
VERSION 11.0.0 | ||
SOVERSION 11 | ||
OUTPUT_NAME "Imath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}" | ||
) | ||
SET_TARGET_PROPERTIES ( IlmThread | ||
PROPERTIES | ||
VERSION 10.0.0 | ||
SOVERSION 10 | ||
VERSION 11.0.0 | ||
SOVERSION 11 | ||
OUTPUT_NAME "IlmThread-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}" | ||
) | ||
SET_TARGET_PROPERTIES ( IexMath | ||
PROPERTIES | ||
VERSION 10.0.0 | ||
SOVERSION 10 | ||
VERSION 11.0.0 | ||
SOVERSION 11 | ||
OUTPUT_NAME "IexMath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR}" | ||
) | ||
|
||
IF ( NOT WIN32 ) | ||
|
@@ -133,9 +189,8 @@ OpenEXR_includedir=\${prefix}/include/OpenEXR | |
Name: IlmBase | ||
Description: Base math and exception libraries | ||
Version: 1.1.0 | ||
Libs: -L\${libdir} -lImath -lIexMath -lHalf -lIex -lIlmThread -pthread | ||
Cflags: -pthread -I\${OpenEXR_includedir} | ||
Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} | ||
Libs: -L\${libdir} -lImath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lIexMath-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lHalf -lIex-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -lIlmThread-${CPACK_PACKAGE_VERSION_MAJOR}_${CPACK_PACKAGE_VERSION_MINOR} -pthreadCflags: -pthread -I\${OpenEXR_includedir} | ||
") | ||
|
||
INSTALL ( FILES | ||
|
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,10 +1,15 @@ | ||
# [email protected] | ||
|
||
ADD_LIBRARY ( Iex STATIC | ||
IF(BUILD_SHARED_LIBS) | ||
ADD_DEFINITIONS(-DIEX_EXPORTS) | ||
ENDIF() | ||
|
||
ADD_LIBRARY ( Iex ${LIB_TYPE} | ||
IexBaseExc.cpp | ||
IexThrowErrnoExc.cpp | ||
) | ||
|
||
|
||
INSTALL ( TARGETS | ||
Iex | ||
DESTINATION | ||
|
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
Oops, something went wrong.