mirror of https://gitee.com/openkylin/ilmbase.git
71 lines
1.4 KiB
CMake
71 lines
1.4 KiB
CMake
# yue.nicholas@gmail.com
|
|
|
|
SET (ILMBASE_LIB_TARGETS "")
|
|
|
|
IF(OPENEXR_BUILD_SHARED)
|
|
LIST ( APPEND ILMBASE_LIB_TARGETS Iex )
|
|
|
|
ADD_LIBRARY ( Iex SHARED
|
|
IexBaseExc.cpp
|
|
IexThrowErrnoExc.cpp
|
|
)
|
|
|
|
TARGET_COMPILE_DEFINITIONS ( Iex PRIVATE IEX_EXPORTS )
|
|
IF (WIN32)
|
|
TARGET_COMPILE_DEFINITIONS ( Iex PUBLIC OPENEXR_DLL )
|
|
ENDIF ()
|
|
|
|
SET_TARGET_PROPERTIES ( Iex
|
|
PROPERTIES
|
|
VERSION ${OPENEXR_VERSION}
|
|
SOVERSION ${OPENEXR_SOVERSION}
|
|
OUTPUT_NAME "Iex${ILMBASE_LIBSUFFIX}"
|
|
)
|
|
ENDIF()
|
|
|
|
IF (BUILD_ILMBASE_STATIC)
|
|
LIST ( APPEND ILMBASE_LIB_TARGETS Iex_static )
|
|
|
|
ADD_LIBRARY ( Iex_static STATIC
|
|
IexBaseExc.cpp
|
|
IexThrowErrnoExc.cpp
|
|
)
|
|
|
|
SET_TARGET_PROPERTIES ( Iex_static
|
|
PROPERTIES
|
|
VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH}
|
|
OUTPUT_NAME "Iex${ILMBASE_LIBSUFFIX}_s"
|
|
)
|
|
ENDIF()
|
|
|
|
IF (OPENEXR_BUILD_SHARED OR BUILD_ILMBASE_STATIC)
|
|
INSTALL ( TARGETS ${ILMBASE_LIB_TARGETS}
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
RUNTIME DESTINATION ${RUNTIME_DIR}
|
|
)
|
|
ENDIF ()
|
|
|
|
INSTALL (
|
|
FILES
|
|
IexBaseExc.h
|
|
IexMathExc.h
|
|
IexThrowErrnoExc.h
|
|
IexErrnoExc.h
|
|
IexMacros.h
|
|
Iex.h
|
|
IexNamespace.h
|
|
IexExport.h
|
|
IexForward.h
|
|
|
|
DESTINATION
|
|
include/OpenEXR
|
|
)
|
|
|
|
if (OPENEXR_BUILD_SHARED)
|
|
add_library(IlmBase::Iex ALIAS Iex)
|
|
endif()
|
|
if (BUILD_ILMBASE_STATIC)
|
|
add_library(IlmBase::Iex_static ALIAS Iex_static)
|
|
endif()
|