Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 9 additions & 60 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.1)
project(CTL VERSION 1.5.2)
enable_testing()
include(GNUInstallDirs)

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
${CMAKE_MODULE_PATH}
Expand All @@ -27,74 +28,22 @@ else()
MESSAGE( STATUS "To use AddressSanitizer, use \"cmake .. -DCMAKE_BUILD_TYPE=asan\"" )
endif()

find_package(Imath CONFIG)

if (NOT TARGET Imath::Imath)
message( STATUS " Couldn't find Imath::Imath, maybe it's older and has IlmBase?")
find_package(IlmBase CONFIG)
if(NOT IlmBase_FOUND)
message( STATUS " Couldn't find IlmBase with find_package(IlmBase CONFIG), trying find_package(IlmBase QUIET)")
find_package(IlmBase QUIET)
endif()
if( IlmBase_FOUND)
message( STATUS "found IlmBase, version ${IlmBase_VERSION}" )
else()
message( SEND_ERROR "IlmBase not found, please set the include and library paths manually" )
endif()
else()
message( STATUS "found Imath, version ${Imath_VERSION}" )
message( STATUS " Imath_FOUND : ${Imath_FOUND}" )
message( STATUS " Imath_LIBRARY : ${Imath_LIBRARY}" )
message( STATUS " Imath_INCLUDE_DIR : ${Imath_INCLUDE_DIR}" )
#find_package(IlmBase CONFIG)
#if(NOT IlmBase_FOUND)
# message( STATUS " Couldn't find IlmBase with find_package(IlmBase CONFIG), trying find_package(IlmBase QUIET)")
# find_package(IlmBase QUIET)
#endif()
#if( IlmBase_FOUND)
# message( STATUS "found IlmBase, version ${IlmBase_VERSION}" )
#endif()
endif ()

if(IlmBase_FOUND)
message( STATUS "IlmBase_INCLUDE_DIR : ${IlmBase_INCLUDE_DIR}" )
#find_package(OpenEXR QUIET CONFIG)
find_package(OpenEXR CONFIG)
if(NOT OpenEXR_FOUND)
message( STATUS " Couldn't find OpenEXR with find_package(OpenEXR CONFIG), trying find_package(OpenEXR QUIET)")
find_package(OpenEXR QUIET)
endif()
else()
find_package(OpenEXR QUIET CONFIG REQUIRED)
if(${OpenEXR_VERSION} VERSION_GREATER_EQUAL 3.0)
message( STATUS " IlmBase not found and OpenEXR_VERSION: ${OpenEXR_VERSION} is greater than or equal to 3.0, we don't need IlmBase")
else()
message( STATUS " IlmBase not found and OpenEXR_VERSION: ${OpenEXR_VERSION} is not greater than or equal to 3.0, we need IlmBase")
find_package(IlmBase CONFIG)
if(NOT IlmBase_FOUND)
message( STATUS " Couldn't find IlmBase with find_package(IlmBase CONFIG), trying find_package(IlmBase QUIET)")
find_package(IlmBase QUIET)
endif()
if( IlmBase_FOUND)
message( STATUS "found IlmBase, version ${IlmBase_VERSION}" )
endif()
endif()
endif()

if( OpenEXR_FOUND )
message( STATUS "found OpenEXR, version ${OpenEXR_VERSION}" )
find_package(OpenEXR 3 CONFIG QUIET)
if(OpenEXR_FOUND)
message(STATUS "Found OpenEXR ${OpenEXR_VERSION}")
else()
message( SEND_ERROR "OpenEXR not found, this is a required dependency" )
find_package(OpenEXR 2 CONFIG REQUIRED)
endif()

add_subdirectory(lib)
add_subdirectory(doc)
if (CTL_BUILD_TOOLS)
add_subdirectory(ctlrender)
add_subdirectory(ctlrender)
add_subdirectory(OpenEXR_CTL)
endif()

if (CTL_BUILD_TESTS)
add_subdirectory(unittest)
enable_testing()
add_subdirectory(unittest)
endif()

4 changes: 0 additions & 4 deletions OpenEXR_CTL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ add_subdirectory( exr_ctl_exr )

add_custom_target( OpenEXR_CTL DEPENDS CtlModules exrdpx exr_ctl_exr )

if ( PKG_CONFIG_FOUND )
configure_file(../config/OpenEXR_CTL.pc.in "${PROJECT_BINARY_DIR}/OpenEXR_CTL.pc" @ONLY)
install( FILES "${PROJECT_BINARY_DIR}/OpenEXR_CTL.pc" DESTINATION lib/pkgconfig COMPONENT dev )
endif()

# TODO CMake config

6 changes: 3 additions & 3 deletions OpenEXR_CTL/CtlModules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
install(
install(
FILES
utilities.ctl
DESTINATION
${INSTALL_LIB_DIR}/CTL
DESTINATION
${CMAKE_INSTALL_DATADIR}/CTL
)

20 changes: 0 additions & 20 deletions OpenEXR_CTL/Makefile.am

This file was deleted.

4 changes: 2 additions & 2 deletions OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ target_link_libraries (exr_ctl_exr
#target_link_libraries( exr_ctl_exr ${IlmBase_LIBRARIES} ${IlmBase_LDFLAGS_OTHER} )
#target_link_libraries( exr_ctl_exr ${OpenEXR_LIBRARIES} ${OpenEXR_LDFLAGS_OTHER} )

install( TARGETS exr_ctl_exr DESTINATION ${INSTALL_BIN_DIR} )
install( TARGETS exr_ctl_exr DESTINATION ${CMAKE_INSTALL_BINDIR} )

install( FILES change_saturation.ctl DESTINATION ${INSTALL_LIB_DIR}/CTL )
install( FILES change_saturation.ctl DESTINATION ${CMAKE_INSTALL_DATADIR}/CTL )
4 changes: 2 additions & 2 deletions OpenEXR_CTL/exrdpx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ target_link_libraries (exrdpx
#target_link_libraries( exrdpx ${IlmBase_LIBRARIES} ${IlmBase_LDFLAGS_OTHER} )
#target_link_libraries( exrdpx ${OpenEXR_LIBRARIES} ${OpenEXR_LDFLAGS_OTHER} )

install( TARGETS exrdpx DESTINATION ${INSTALL_BIN_DIR} )
install( TARGETS exrdpx DESTINATION ${CMAKE_INSTALL_BINDIR} )

install( FILES transform_DPX_EXR.ctl transform_EXR_DPX.ctl DESTINATION ${INSTALL_LIB_DIR}/CTL )
install( FILES transform_DPX_EXR.ctl transform_EXR_DPX.ctl DESTINATION ${CMAKE_INSTALL_DATADIR}/CTL )


11 changes: 0 additions & 11 deletions config/CTL.pc.in

This file was deleted.

2 changes: 0 additions & 2 deletions config/CTLBuildTreeSettings.cmake.in

This file was deleted.

21 changes: 0 additions & 21 deletions config/CTLConfig.cmake.in

This file was deleted.

13 changes: 0 additions & 13 deletions config/CTLConfigVersion.cmake.in

This file was deleted.

11 changes: 0 additions & 11 deletions config/OpenEXR_CTL.pc.in

This file was deleted.

1 change: 1 addition & 0 deletions lib/IlmCtlMath/CtlPointTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#include <ImathBox.h>
#include <vector>
#include <algorithm>
#include <limits> // std::numeric_limits

namespace Ctl {

Expand Down
2 changes: 1 addition & 1 deletion lib/IlmImfCtl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ target_link_libraries (IlmImfCtl
install(FILES
ImfCtlApplyTransforms.h
DESTINATION
${CMAKE_INSTALL_LIBDIR}/OpenEXR
${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR
)

install(TARGETS IlmImfCtl DESTINATION ${CMAKE_INSTALL_LIBDIR})
Empty file removed lib/dpx/test.dpx.od
Empty file.