ctl-1.5.2-Use-GNUInstallDirs-and-fix-PkgConfig-files-1.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. From db1cccd9cee830f8822521f2c401ea74ad161360 Mon Sep 17 00:00:00 2001
  2. From: Jonathan Scruggs <j.scruggs@gmail.com>
  3. Date: Mon, 25 Sep 2017 17:41:26 +0100
  4. Subject: [PATCH] CTL: Use GNUInstallDirs and fix PkgConfig files
  5. * GNUInstallDirs are variables set by each distro and OS, so we
  6. don't need to define them manually. They can also be set manually
  7. during the configure phase. The code to define custom directories can
  8. be removed and replaced with the equivalent GNUInstallDirs variable.
  9. * Pkg-Config is used to find IlmBase and OpenEXR, but isn't fully
  10. utilized everywhere. This makes Pkg-Config a hard dependency so that
  11. the libraries and directories can be found easily. This will use the
  12. correct libraries no matter how they are named, so this is compatible
  13. with both pre-2.0 and post 2.0 naming schemes.
  14. * The Pkg-Config files had several errors that are now fixed.
  15. Upstream PR: https://github.com/ampas/CTL/pull/67
  16. ---
  17. CMakeLists.txt | 36 ++++++++---------------------
  18. OpenEXR_CTL/CMakeLists.txt | 2 +-
  19. OpenEXR_CTL/CtlModules/CMakeLists.txt | 2 +-
  20. OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt | 4 ++--
  21. OpenEXR_CTL/exrdpx/CMakeLists.txt | 4 ++--
  22. config/CTL.pc.in | 8 +++----
  23. config/OpenEXR_CTL.pc.in | 15 ++++++-------
  24. configure.cmake | 41 ++++++++++++++++------------------
  25. ctlrender/CMakeLists.txt | 20 ++++++++---------
  26. doc/CMakeLists.txt | 2 +-
  27. lib/IlmCtl/CMakeLists.txt | 4 ++--
  28. lib/IlmCtlMath/CMakeLists.txt | 4 ++--
  29. lib/IlmCtlSimd/CMakeLists.txt | 6 ++---
  30. lib/IlmImfCtl/CMakeLists.txt | 6 ++---
  31. lib/dpx/CMakeLists.txt | 1 +
  32. 15 files changed, 66 insertions(+), 89 deletions(-)
  33. diff --git a/CMakeLists.txt b/CMakeLists.txt
  34. index 01f622c..35e9a48 100644
  35. --- a/CMakeLists.txt
  36. +++ b/CMakeLists.txt
  37. @@ -1,22 +1,14 @@
  38. cmake_minimum_required(VERSION 2.8)
  39. project( CTL )
  40. +INCLUDE ( GNUInstallDirs )
  41. +
  42. set( CTL_MAJOR_VERSION 1 )
  43. set( CTL_MINOR_VERSION 5 )
  44. -set( CTL_PATCH_VERSION 0 )
  45. +set( CTL_PATCH_VERSION 2 )
  46. set( CTL_VERSION ${CTL_MAJOR_VERSION}.${CTL_MINOR_VERSION}.${CTL_PATCH_VERSION} )
  47. -## Make install directories overrideable
  48. -set( INSTALL_LIB_DIR lib CACHE PATH "Install directory for libraries" )
  49. -set( INSTALL_BIN_DIR bin CACHE PATH "Install directory for executable binaries" )
  50. -set( INSTALL_INCLUDE_DIR include CACHE PATH "Install directory for public header files" )
  51. -set( INSTALL_DOC_DIR doc CACHE PATH "Install directory for documentation" )
  52. -if( WIN32 AND NOT CYGWIN )
  53. - set(DEF_INSTALL_CMAKE_DIR CMake)
  54. -else()
  55. - set(DEF_INSTALL_CMAKE_DIR lib/CMake/CTL)
  56. -endif()
  57. -set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Install directory for project CMake files" )
  58. +set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/CTL CACHE PATH "Install directory for project CMake files" )
  59. # use, i.e. don't skip the full RPATH for the build tree
  60. SET(CMAKE_SKIP_BUILD_RPATH FALSE)
  61. @@ -28,20 +20,11 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
  62. # which point to directories outside the build tree to the install RPATH
  63. SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
  64. # the RPATH to be used when installing, but only if it's not a system directory
  65. -LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
  66. +LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}" isSystemDir)
  67. IF("${isSystemDir}" STREQUAL "-1")
  68. - SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
  69. + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
  70. ENDIF("${isSystemDir}" STREQUAL "-1")
  71. -
  72. -## convert install paths to absolute
  73. -foreach( p LIB BIN INCLUDE CMAKE DOC)
  74. - set( var INSTALL_${p}_DIR )
  75. - if( NOT IS_ABSOLUTE "${${var}}" )
  76. - set( ${var} "${CMAKE_INSTALL_PREFIX}/${${var}}" )
  77. - endif()
  78. -endforeach()
  79. -
  80. option(ENABLE_SHARED "Enable Shared Libraries" ON)
  81. if ( ENABLE_SHARED )
  82. @@ -70,20 +53,19 @@ export( TARGETS IlmCtl IlmCtlMath IlmCtlSimd FILE "${PROJECT_BINARY_DIR}/CTLLibr
  83. export(PACKAGE CTL)
  84. # Create a CTLBuildTreeSettings.cmake file for the use from the build tree
  85. -file(RELATIVE_PATH CONF_REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}")
  86. +file(RELATIVE_PATH CONF_REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
  87. configure_file(config/CTLBuildTreeSettings.cmake.in "${PROJECT_BINARY_DIR}/CTLBuildTreeSettings.cmake" @ONLY)
  88. configure_file(config/CTLConfig.cmake.in "${PROJECT_BINARY_DIR}/CTLConfig.cmake" @ONLY)
  89. configure_file(config/CTLConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/CTLConfigVersion.cmake" @ONLY)
  90. if ( PKG_CONFIG_FOUND )
  91. configure_file(config/CTL.pc.in "${PROJECT_BINARY_DIR}/CTL.pc" @ONLY)
  92. -install( FILES "${PROJECT_BINARY_DIR}/CTL.pc" DESTINATION lib/pkgconfig COMPONENT dev )
  93. +install( FILES "${PROJECT_BINARY_DIR}/CTL.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT dev )
  94. endif()
  95. install( FILES
  96. "${PROJECT_BINARY_DIR}/CTLConfig.cmake"
  97. "${PROJECT_BINARY_DIR}/CTLConfigVersion.cmake"
  98. + "${PROJECT_BINARY_DIR}/CTLLibraryDepends.cmake"
  99. DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
  100. -install(FILES "${PROJECT_BINARY_DIR}/CTLLibraryDepends.cmake" DESTINATION
  101. - "${INSTALL_CMAKE_DIR}" COMPONENT dev)
  102. diff --git a/OpenEXR_CTL/CMakeLists.txt b/OpenEXR_CTL/CMakeLists.txt
  103. index c1ca53e..3f19dd4 100644
  104. --- a/OpenEXR_CTL/CMakeLists.txt
  105. +++ b/OpenEXR_CTL/CMakeLists.txt
  106. @@ -13,7 +13,7 @@ add_custom_target( OpenEXR_CTL DEPENDS CtlModules exrdpx exr_ctl_exr )
  107. if ( PKG_CONFIG_FOUND )
  108. configure_file(../config/OpenEXR_CTL.pc.in "${PROJECT_BINARY_DIR}/OpenEXR_CTL.pc" @ONLY)
  109. -install( FILES "${PROJECT_BINARY_DIR}/OpenEXR_CTL.pc" DESTINATION lib/pkgconfig COMPONENT dev )
  110. +install( FILES "${PROJECT_BINARY_DIR}/OpenEXR_CTL.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT dev )
  111. endif()
  112. # TODO CMake config
  113. diff --git a/OpenEXR_CTL/CtlModules/CMakeLists.txt b/OpenEXR_CTL/CtlModules/CMakeLists.txt
  114. index c63c22e..9c9e5b8 100644
  115. --- a/OpenEXR_CTL/CtlModules/CMakeLists.txt
  116. +++ b/OpenEXR_CTL/CtlModules/CMakeLists.txt
  117. @@ -2,6 +2,6 @@ install(
  118. FILES
  119. utilities.ctl
  120. DESTINATION
  121. - ${INSTALL_LIB_DIR}/CTL
  122. + ${CMAKE_INSTALL_LIBDIR}/CTL
  123. )
  124. diff --git a/OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt b/OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt
  125. index e396ec5..1f0eea0 100644
  126. --- a/OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt
  127. +++ b/OpenEXR_CTL/exr_ctl_exr/CMakeLists.txt
  128. @@ -20,6 +20,6 @@ target_link_libraries( exr_ctl_exr IlmCtlSimd IlmCtlMath IlmCtl IlmImfCtl )
  129. target_link_libraries( exr_ctl_exr ${IlmBase_LIBRARIES} ${IlmBase_LDFLAGS_OTHER} )
  130. target_link_libraries( exr_ctl_exr ${OpenEXR_LIBRARIES} ${OpenEXR_LDFLAGS_OTHER} )
  131. -install( TARGETS exr_ctl_exr DESTINATION ${INSTALL_BIN_DIR} )
  132. +install( TARGETS exr_ctl_exr DESTINATION ${CMAKE_INSTALL_BINDIR} )
  133. -install( FILES change_saturation.ctl DESTINATION ${INSTALL_LIB_DIR}/CTL )
  134. +install( FILES change_saturation.ctl DESTINATION ${CMAKE_INSTALL_LIBDIR}/CTL )
  135. diff --git a/OpenEXR_CTL/exrdpx/CMakeLists.txt b/OpenEXR_CTL/exrdpx/CMakeLists.txt
  136. index 50bd116..d9eadd8 100644
  137. --- a/OpenEXR_CTL/exrdpx/CMakeLists.txt
  138. +++ b/OpenEXR_CTL/exrdpx/CMakeLists.txt
  139. @@ -20,8 +20,8 @@ target_link_libraries( exrdpx IlmCtlSimd IlmCtlMath IlmCtl IlmImfCtl )
  140. target_link_libraries( exrdpx ${IlmBase_LIBRARIES} ${IlmBase_LDFLAGS_OTHER} )
  141. target_link_libraries( exrdpx ${OpenEXR_LIBRARIES} ${OpenEXR_LDFLAGS_OTHER} )
  142. -install( TARGETS exrdpx DESTINATION ${INSTALL_BIN_DIR} )
  143. +install( TARGETS exrdpx DESTINATION ${CMAKE_INSTALL_BINDIR} )
  144. -install( FILES transform_DPX_EXR.ctl transform_EXR_DPX.ctl DESTINATION ${INSTALL_LIB_DIR}/CTL )
  145. +install( FILES transform_DPX_EXR.ctl transform_EXR_DPX.ctl DESTINATION ${CMAKE_INSTALL_LIBDIR}/CTL )
  146. diff --git a/config/CTL.pc.in b/config/CTL.pc.in
  147. index 6d6e732..9b212a4 100644
  148. --- a/config/CTL.pc.in
  149. +++ b/config/CTL.pc.in
  150. @@ -1,8 +1,6 @@
  151. -prefix=@CMAKE_INSTALL_PREFIX@
  152. -exec_prefix=@INSTALL_BIN_DIR@
  153. -libdir=@INSTALL_LIB_DIR@
  154. -includedir=@INSTALL_INCLUDE_DIR@
  155. -CTL_includedir=@INSTALL_INCLUDE_DIR@/CTL
  156. +libdir=@CMAKE_INSTALL_FULL_LIBDIR@
  157. +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
  158. +CTL_includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/CTL
  159. Name: CTL
  160. Description: CTL interpreter library
  161. diff --git a/config/OpenEXR_CTL.pc.in b/config/OpenEXR_CTL.pc.in
  162. index 4cef5c6..39a1a3f 100644
  163. --- a/config/OpenEXR_CTL.pc.in
  164. +++ b/config/OpenEXR_CTL.pc.in
  165. @@ -1,11 +1,10 @@
  166. -prefix=@prefix@
  167. -exec_prefix=@exec_prefix@
  168. -libdir=@libdir@
  169. -includedir=@includedir@
  170. -OpenEXR_includedir=@includedir@/OpenEXR
  171. +libdir=@CMAKE_INSTALL_FULL_LIBDIR@
  172. +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
  173. +OpenEXR_includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/OpenEXR
  174. Name: OpenEXR_CTL
  175. Description: Simplified OpenEXR interface to CTL
  176. -Version: @OPENEXR_CTL_VERSION@
  177. -Libs: -L${libdir} -lIlmImfCtl @OPENEXR_LDFLAGS@ @CTL_LDFLAGS@
  178. -Cflags: @CTL_CXXFLAGS_PC@ @OPENEXR_CXXFLAGS@ -I${OpenEXR_includedir}
  179. +Version: @CTL_VERSION@
  180. +Libs: -L${libdir} -lIlmImfCtl
  181. +Cflags: -I${OpenEXR_includedir}
  182. +Requires: CTL,OpenEXR
  183. diff --git a/configure.cmake b/configure.cmake
  184. index 1817071..eb7e14e 100644
  185. --- a/configure.cmake
  186. +++ b/configure.cmake
  187. @@ -1,10 +1,7 @@
  188. -# Until we get some of these modules into the upstream packages, put them here
  189. -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
  190. -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/CMake")
  191. +# Make Pkg-Config required.
  192. +find_package( PkgConfig )
  193. -find_package( PkgConfig QUIET )
  194. -
  195. -find_package( IlmBase QUIET )
  196. +PKG_CHECK_MODULES ( IlmBase REQUIRED IlmBase )
  197. if(IlmBase_FOUND)
  198. message( STATUS "found IlmBase, version ${IlmBase_VERSION}" )
  199. ###
  200. @@ -13,11 +10,11 @@ if(IlmBase_FOUND)
  201. ###
  202. include_directories( ${IlmBase_INCLUDE_DIRS} )
  203. link_directories( ${IlmBase_LIBRARY_DIRS} )
  204. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IlmBase_CFLAGS}" )
  205. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IlmBase_CFLAGS}" )
  206. - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${IlmBase_LDFLAGS}" )
  207. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${IlmBase_LDFLAGS}" )
  208. - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${IlmBase_LDFLAGS}" )
  209. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IlmBase_CFLAGS_OTHER}" )
  210. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IlmBase_CFLAGS_OTHER}" )
  211. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${IlmBase_LDFLAGS_OTHER}" )
  212. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${IlmBase_LDFLAGS_OTHER}" )
  213. + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${IlmBase_LDFLAGS_OTHER}" )
  214. else()
  215. message( SEND_ERROR "IlmBase not found, please set the include and library paths manually" )
  216. endif()
  217. @@ -39,20 +36,20 @@ else()
  218. endif()
  219. endif()
  220. -find_package( OpenEXR QUIET )
  221. +PKG_CHECK_MODULES ( OpenEXR REQUIRED OpenEXR )
  222. if (OpenEXR_FOUND)
  223. message( STATUS "Found OpenEXR, version ${OpenEXR_VERSION}" )
  224. else()
  225. message( WARNING "Unable to find OpenEXR libraries, disabling" )
  226. endif()
  227. -find_package( AcesContainer )
  228. -if (AcesContainer_FOUND)
  229. - message( STATUS "Found AcesContainer, version ${AcesContainer_VERSION}" )
  230. -else()
  231. - if ( PKG_CONFIG_FOUND )
  232. - pkg_check_modules( AcesContainer AcesContainer )
  233. - else()
  234. - message( WARNING "Unable to find AcesContainer libraries, disabling" )
  235. - endif()
  236. -endif()
  237. +find_package( AcesContainer )
  238. + if (AcesContainer_FOUND)
  239. + message( STATUS "Found AcesContainer, version ${AcesContainer_VERSION}" )
  240. + else()
  241. + if ( PKG_CONFIG_FOUND )
  242. + pkg_check_modules( AcesContainer AcesContainer )
  243. + else()
  244. + message( WARNING "Unable to find AcesContainer libraries, disabling" )
  245. + endif()
  246. + endif()
  247. diff --git a/ctlrender/CMakeLists.txt b/ctlrender/CMakeLists.txt
  248. index 9fced14..d97093d 100644
  249. --- a/ctlrender/CMakeLists.txt
  250. +++ b/ctlrender/CMakeLists.txt
  251. @@ -11,12 +11,12 @@ include_directories( ${OpenEXR_INCLUDE_DIRS} )
  252. link_directories( ${OpenEXR_LIBRARY_DIRS} )
  253. endif()
  254. -if ( AcesContainer_FOUND )
  255. -add_definitions( -DHAVE_ACESFILE=1 )
  256. -include_directories( ${AcesContainer_INCLUDE_DIRS} )
  257. -link_directories( ${AcesContainer_LIBRARY_DIRS} )
  258. -endif()
  259. -
  260. +if ( AcesContainer_FOUND )
  261. +add_definitions( -DHAVE_ACESFILE=1 )
  262. +include_directories( ${AcesContainer_INCLUDE_DIRS} )
  263. +link_directories( ${AcesContainer_LIBRARY_DIRS} )
  264. +endif()
  265. +
  266. include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/lib/IlmCtl" "${PROJECT_SOURCE_DIR}/lib/IlmCtlMath" "${PROJECT_SOURCE_DIR}/lib/IlmCtlSimd" "${PROJECT_SOURCE_DIR}/lib/dpx" )
  267. add_executable( ctlrender
  268. @@ -41,9 +41,9 @@ if (OpenEXR_FOUND)
  269. target_link_libraries( ctlrender ${OpenEXR_LIBRARIES} )
  270. target_link_libraries( ctlrender ${OpenEXR_LDFLAGS_OTHER} )
  271. endif()
  272. -if (AcesContainer_FOUND)
  273. -target_link_libraries( ctlrender ${AcesContainer_LIBRARIES} )
  274. -target_link_libraries( ctlrender ${AcesContainer_LDFLAGS_OTHER} )
  275. +if (AcesContainer_FOUND)
  276. +target_link_libraries( ctlrender ${AcesContainer_LIBRARIES} )
  277. +target_link_libraries( ctlrender ${AcesContainer_LDFLAGS_OTHER} )
  278. endif()
  279. -install( TARGETS ctlrender DESTINATION bin )
  280. +install( TARGETS ctlrender DESTINATION ${CMAKE_INSTALL_BINDIR} )
  281. diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
  282. index 0b123d0..9776205 100644
  283. --- a/doc/CMakeLists.txt
  284. +++ b/doc/CMakeLists.txt
  285. @@ -1 +1 @@
  286. -install( FILES CtlManual.pdf CtlManual.doc DESTINATION doc/CTL )
  287. +install( FILES CtlManual.pdf CtlManual.doc DESTINATION ${CMAKE_INSTALL_DOCDIR} )
  288. diff --git a/lib/IlmCtl/CMakeLists.txt b/lib/IlmCtl/CMakeLists.txt
  289. index 3672a43..ef301bd 100644
  290. --- a/lib/IlmCtl/CMakeLists.txt
  291. +++ b/lib/IlmCtl/CMakeLists.txt
  292. @@ -22,7 +22,7 @@ add_library( IlmCtl ${DO_SHARED}
  293. )
  294. target_link_libraries( IlmCtl ${IlmBase_LDFLAGS_OTHER} )
  295. -target_link_libraries( IlmCtl Iex IlmThread Half )
  296. +target_link_libraries( IlmCtl ${IlmBase_LIBRARIES} )
  297. set_target_properties( IlmCtl PROPERTIES
  298. VERSION ${CTL_VERSION}
  299. @@ -50,4 +50,4 @@ install( FILES
  300. CtlVersion.h
  301. DESTINATION include/CTL )
  302. -install( TARGETS IlmCtl DESTINATION lib )
  303. +install( TARGETS IlmCtl DESTINATION ${CMAKE_INSTALL_LIBDIR} )
  304. diff --git a/lib/IlmCtlMath/CMakeLists.txt b/lib/IlmCtlMath/CMakeLists.txt
  305. index 96738cf..6997c74 100644
  306. --- a/lib/IlmCtlMath/CMakeLists.txt
  307. +++ b/lib/IlmCtlMath/CMakeLists.txt
  308. @@ -18,8 +18,8 @@ install( FILES
  309. CtlLookupTable.h
  310. CtlRbfInterpolator.h
  311. CtlSparseMatrix.h
  312. - DESTINATION include/CTL )
  313. + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CTL )
  314. -install( TARGETS IlmCtlMath DESTINATION lib )
  315. +install( TARGETS IlmCtlMath DESTINATION ${CMAKE_INSTALL_LIBDIR} )
  316. # TODO Add Imath and Iex libadd dependency and version info
  317. diff --git a/lib/IlmCtlSimd/CMakeLists.txt b/lib/IlmCtlSimd/CMakeLists.txt
  318. index 2ba792a..5eaf87d 100644
  319. --- a/lib/IlmCtlSimd/CMakeLists.txt
  320. +++ b/lib/IlmCtlSimd/CMakeLists.txt
  321. @@ -1,7 +1,7 @@
  322. include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/lib/IlmCtl" "${PROJECT_SOURCE_DIR}/lib/IlmCtlMath" )
  323. add_executable( halfExpLogTable halfExpLogTable.cpp )
  324. -target_link_libraries( halfExpLogTable Half )
  325. +target_link_libraries( halfExpLogTable ${IlmBase_LIBRARIES} )
  326. add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/halfExpLogTable.h"
  327. COMMAND halfExpLogTable "${CMAKE_CURRENT_BINARY_DIR}/halfExpLogTable.h" "${CMAKE_CURRENT_BINARY_DIR}/halfExpLog.h"
  328. @@ -40,6 +40,6 @@ set_target_properties( IlmCtlSimd PROPERTIES
  329. SOVERSION ${CTL_VERSION}
  330. )
  331. -install( FILES CtlSimdInterpreter.h DESTINATION include/CTL )
  332. +install( FILES CtlSimdInterpreter.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CTL )
  333. -install( TARGETS IlmCtlSimd DESTINATION lib )
  334. +install( TARGETS IlmCtlSimd DESTINATION ${CMAKE_INSTALL_LIBDIR} )
  335. diff --git a/lib/IlmImfCtl/CMakeLists.txt b/lib/IlmImfCtl/CMakeLists.txt
  336. index 47563df..784e27f 100644
  337. --- a/lib/IlmImfCtl/CMakeLists.txt
  338. +++ b/lib/IlmImfCtl/CMakeLists.txt
  339. @@ -7,10 +7,10 @@ add_library( IlmImfCtl ${DO_SHARED}
  340. ImfCtlCopyFunctionArg.cpp
  341. )
  342. -target_link_libraries( IlmImfCtl IlmCtl IlmImf Iex IlmThread Half )
  343. +target_link_libraries( IlmImfCtl IlmCtl ${OpenEXR_LIBRARIES} ${IlmBase_LIBRARIES} )
  344. -install( FILES ImfCtlApplyTransforms.h DESTINATION include/OpenEXR )
  345. +install( FILES ImfCtlApplyTransforms.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OpenEXR )
  346. export( TARGETS IlmImfCtl IlmCtl FILE "${PROJECT_BINARY_DIR}/CTLLibraryDepends.cmake" )
  347. -install( TARGETS IlmImfCtl DESTINATION lib )
  348. +install( TARGETS IlmImfCtl DESTINATION ${CMAKE_INSTALL_LIBDIR} )
  349. diff --git a/lib/dpx/CMakeLists.txt b/lib/dpx/CMakeLists.txt
  350. index c8be26e..918890e 100644
  351. --- a/lib/dpx/CMakeLists.txt
  352. +++ b/lib/dpx/CMakeLists.txt
  353. @@ -11,3 +11,4 @@ add_library( ctldpx
  354. dpx_rw.cc
  355. )
  356. +target_link_libraries( ctldpx ${IlmBase_LIBRARIES} )