Skip to content

Commit a3ef621

Browse files
committed
Now CTL uses cmake to configure builds.
Everything in the repository is now build with a few simple commands. e.g. a typical build from CTL root directory would look like: mkdir build && cd build cmake .. make check make sudo make install
1 parent 9276ec7 commit a3ef621

File tree

560 files changed

+844
-216385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

560 files changed

+844
-216385
lines changed

.gitignore

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,2 @@
1-
aclocal.m4
2-
autom4te.cache
3-
config.h
4-
config.h.in
5-
config.log
6-
config.status
7-
configure
8-
CVS
9-
depcomp
10-
.deps
11-
libtool
12-
ltmain.sh
13-
Makefile
14-
Makefile.in
15-
OpenEXR.pc
16-
stamp-h
17-
stamp-h.in
1+
Build
2+
Debug

CTL/AUTHORS AUTHORS

File renamed without changes.

CMakeLists.txt

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
project( CTL )
3+
4+
set( CTL_MAJOR_VERSION 1 )
5+
set( CTL_MINOR_VERSION 4 )
6+
set( CTL_PATCH_VERSION 2 )
7+
set( CTL_VERSION ${CTL_MAJOR_VERSION}.${CTL_MINOR_VERSION}.${CTL_PATCH_VERSION} )
8+
9+
## Make install directories overrideable
10+
set( INSTALL_LIB_DIR lib CACHE PATH "Install directory for libraries" )
11+
set( INSTALL_BIN_DIR bin CACHE PATH "Install directory for executable binaries" )
12+
set( INSTALL_INCLUDE_DIR include CACHE PATH "Install directory for public header files" )
13+
set( INSTALL_DOC_DIR doc CACHE PATH "Install directory for documentation" )
14+
if( WIN32 AND NOT CYGWIN )
15+
set(DEF_INSTALL_CMAKE_DIR CMake)
16+
else()
17+
set(DEF_INSTALL_CMAKE_DIR lib/CMake/CTL)
18+
endif()
19+
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Install directory for project CMake files" )
20+
SET( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" )
21+
22+
## convert install paths to absolute
23+
foreach( p LIB BIN INCLUDE CMAKE DOC)
24+
set( var INSTALL_${p}_DIR )
25+
if( NOT IS_ABSOLUTE "${${var}}" )
26+
set( ${var} "${CMAKE_INSTALL_PREFIX}/${${var}}" )
27+
endif()
28+
endforeach()
29+
30+
option(ENABLE_SHARED "Enable Shared Libraries" ON)
31+
32+
if ( ENABLE_SHARED )
33+
set( DO_SHARED SHARED )
34+
else()
35+
set( DO_SHARED STATIC )
36+
endif()
37+
38+
include( configure.cmake )
39+
40+
# generated config files end up in binary dir so to find them, need
41+
# to add to include path
42+
include_directories( "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" )
43+
# implement find library stuff...
44+
45+
###
46+
### Everyone (well, except for DPX) uses IlmBase, so
47+
### make that a global setting
48+
###
49+
if ( IlmBase_FOUND )
50+
include_directories( ${IlmBase_INCLUDE_DIRS} )
51+
link_directories( ${IlmBase_LIBRARY_DIRS} )
52+
endif()
53+
54+
add_definitions( -DPACKAGE="CTL" -DVERSION="${CTL_VERSION}" )
55+
add_subdirectory(doc)
56+
add_subdirectory(lib)
57+
add_subdirectory(ctlrender)
58+
add_subdirectory(OpenEXR_CTL)
59+
add_subdirectory(Nuke_CTL)
60+
add_subdirectory(unittest EXCLUDE_FROM_ALL)
61+
62+
# Add all targets to the build-tree export set
63+
export( TARGETS IlmCtl IlmCtlMath IlmCtlSimd FILE "${PROJECT_BINARY_DIR}/CTLLibraryDepends.cmake" )
64+
export(PACKAGE CTL)
65+
66+
# Create a CTLBuildTreeSettings.cmake file for the use from the build tree
67+
file(RELATIVE_PATH CONF_REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}")
68+
configure_file(config/CTLBuildTreeSettings.cmake.in "${PROJECT_BINARY_DIR}/CTLBuildTreeSettings.cmake" @ONLY)
69+
configure_file(config/CTLConfig.cmake.in "${PROJECT_BINARY_DIR}/CTLConfig.cmake" @ONLY)
70+
configure_file(config/CTLConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/CTLConfigVersion.cmake" @ONLY)
71+
72+
if ( PKG_CONFIG_FOUND )
73+
configure_file(config/CTL.pc.in "${PROJECT_BINARY_DIR}/CTL.pc" @ONLY)
74+
install( FILES "${PROJECT_BINARY_DIR}/CTL.pc" DESTINATION lib/pkgconfig COMPONENT dev )
75+
endif()
76+
77+
install( FILES
78+
"${PROJECT_BINARY_DIR}/CTLConfig.cmake"
79+
"${PROJECT_BINARY_DIR}/CTLConfigVersion.cmake"
80+
DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
81+
install(FILES "${PROJECT_BINARY_DIR}/CTLLibraryDepends.cmake" DESTINATION
82+
"${INSTALL_CMAKE_DIR}" COMPONENT dev)
83+

CTL/COPYING

-42
This file was deleted.

CTL/CTL.pc.in

-11
This file was deleted.

CTL/INSTALL

-2
This file was deleted.

CTL/IlmCtl/Makefile.am

-78
This file was deleted.

CTL/IlmCtlMath/Makefile.am

-33
This file was deleted.

CTL/IlmCtlMathTest/Makefile.am

-23
This file was deleted.

0 commit comments

Comments
 (0)