Skip to content

Commit f51dbff

Browse files
committed
fix build
Signed-off-by: Anton Dukhovnikov <[email protected]>
1 parent 808b2e9 commit f51dbff

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,18 @@ jobs:
100100
c_compiler: gcc
101101
cpp_compiler: g++
102102
install_deps: install_deps_linux
103+
build_shared_libs: ON
103104
- title: ubuntu
104105
os: ubuntu-24.04
105106
cpp_compiler: clang++
106107
install_deps: install_deps_linux
108+
build_shared_libs: ON
107109
- title: macos
108110
os: macos-latest
109111
c_compiler: clang
110112
cpp_compiler: clang++
111113
install_deps: install_deps_mac
114+
build_shared_libs: ON
112115
exclude:
113116
- title: windows
114117
c_compiler: gcc

CMakeLists.txt

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ else ()
6464
set ( DO_SHARED STATIC )
6565
endif ()
6666

67-
include ( GNUInstallDirs )
6867
include ( configure.cmake )
6968

7069

@@ -98,25 +97,6 @@ install( FILES
9897

9998

10099

101-
install(
102-
TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
103-
EXPORT RawToAcesConfig
104-
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
105-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
106-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
107-
)
108-
109-
export(
110-
TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
111-
NAMESPACE RawToAces::
112-
FILE "${CMAKE_CURRENT_BINARY_DIR}/RawToAcesConfig.cmake"
113-
)
114-
115-
install(
116-
EXPORT RawToAcesConfig
117-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/CMake/RawToAces"
118-
NAMESPACE RawToAces::
119-
)
120100

121101

122102

@@ -127,6 +107,28 @@ install( FILES "${PROJECT_BINARY_DIR}/RAWTOACESLibraryDepends.cmake" DESTINATION
127107
endif( )
128108

129109
if ( APPLE OR UNIX )
110+
include ( GNUInstallDirs )
111+
112+
install(
113+
TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
114+
EXPORT RawToAcesConfig
115+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
116+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
117+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
118+
)
119+
120+
export(
121+
TARGETS rawtoaces_idt rawtoaces_util rawtoaces_util2 rawtoaces
122+
NAMESPACE RawToAces::
123+
FILE "${CMAKE_CURRENT_BINARY_DIR}/RawToAcesConfig.cmake"
124+
)
125+
126+
install(
127+
EXPORT RawToAcesConfig
128+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/CMake/RawToAces"
129+
NAMESPACE RawToAces::
130+
)
131+
130132
install (DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATADIR}/rawtoaces)
131133
endif()
132134

build_scripts/install_aces_container.bash

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
set -ex
44

5-
git clone https://github.com/ampas/aces_container.git aces_container
5+
git clone https://github.com/ampas/aces_container.git ../aces_container
66

77
if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "darwin"* ]]; then
88
cmake \
9-
-S aces_container \
10-
-B aces_container/build \
9+
-S ../aces_container \
10+
-B ../aces_container/build \
1111
-DCMAKE_CXX_FLAGS="-Wno-c++11-narrowing"
12-
cmake --build aces_container/build
13-
sudo cmake --install aces_container/build
12+
cmake --build ../aces_container/build
13+
sudo cmake --install ../aces_container/build
1414
else
1515
cmake \
16-
-S aces_container \
17-
-B aces_container/build \
18-
-DCMAKE_INSTALL_PREFIX="." \
16+
-S ../aces_container \
17+
-B ../aces_container/build \
18+
-DCMAKE_INSTALL_PREFIX="../AcesContainer" \
1919
-DBUILD_SHARED_LIBS=OFF
20-
cmake --build aces_container/build --config Release
21-
cmake --install aces_container/build --config Release
20+
cmake --build ../aces_container/build --config Release
21+
cmake --install ../aces_container/build --config Release
2222
fi
2323

2424
cd ../..

configure.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Until we get some of these modules into the upstream packages, put them here
22
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
33
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/CMake")
4-
4+
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CMAKE_SOURCE_DIR}/../")
55

66
find_package ( OpenImageIO CONFIG REQUIRED )
77
find_package ( AcesContainer CONFIG REQUIRED )

src/rawtoaces/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@ add_executable( rawtoaces
77

88
set_property(TARGET rawtoaces PROPERTY CXX_STANDARD 17)
99

10-
target_include_directories( rawtoaces
11-
PUBLIC
12-
${AcesContainer_INCLUDE_DIRS}
13-
)
14-
1510
target_link_libraries ( rawtoaces
1611
PUBLIC
1712
${RAWTOACESLIB}
18-
INTERFACE
19-
Boost::headers
2013
)
2114

2215
if ( LIBRAW_CONFIG_FOUND )

src/rawtoaces_idt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ add_library( ${RAWTOACESIDTLIB} ${DO_SHARED}
1313

1414
set_property(TARGET ${RAWTOACESIDTLIB} PROPERTY CXX_STANDARD 17)
1515

16+
# Eigen is also used in rawtoaces_util and rawtoaces_util2, so setting it public here
1617
target_link_libraries(
1718
${RAWTOACESIDTLIB}
19+
PUBLIC
20+
Eigen3::Eigen
1821
PRIVATE
1922
Boost::boost
2023
Boost::system
2124
Imath::Imath
2225
Imath::ImathConfig
2326
)
2427

28+
# Ceres is also used in rawtoaces_util and rawtoaces_util2, so setting it public here
2529
if ( ${Ceres_VERSION_MAJOR} GREATER 1 )
2630
target_link_libraries( ${RAWTOACESIDTLIB} PUBLIC Ceres::ceres )
2731
else ()

src/rawtoaces_util/CMakeLists.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,27 @@ add_library ( ${RAWTOACESLIB} ${DO_SHARED}
1010

1111
set_property(TARGET ${RAWTOACESLIB} PROPERTY CXX_STANDARD 17)
1212

13-
if ( AcesContainer_FOUND )
14-
target_include_directories ( ${RAWTOACESLIB} PRIVATE ${AcesContainer_INCLUDE_DIRS} )
15-
target_link_directories ( ${RAWTOACESLIB} PUBLIC ${AcesContainer_LIBRARY_DIRS} )
16-
target_link_libraries ( ${RAWTOACESLIB}
17-
PRIVATE
18-
${AcesContainer_LIBRARIES}
19-
${AcesContainer_LDFLAGS_OTHER}
20-
)
21-
endif()
13+
target_include_directories ( ${RAWTOACESLIB} PRIVATE ${AcesContainer_INCLUDE_DIRS} )
14+
target_link_directories ( ${RAWTOACESLIB} PUBLIC ${AcesContainer_LIBRARY_DIRS} )
15+
target_link_libraries ( ${RAWTOACESLIB}
16+
PUBLIC
17+
${AcesContainer_LIBRARIES}
18+
${AcesContainer_LDFLAGS_OTHER}
19+
)
2220

2321
target_link_libraries ( ${RAWTOACESLIB}
2422
PUBLIC
2523
${RAWTOACESIDTLIB}
24+
PRIVATE
2625
Boost::filesystem
27-
INTERFACE
28-
Eigen3::Eigen
2926
Imath::Imath
3027
Imath::ImathConfig
3128
)
3229

3330
if ( LIBRAW_CONFIG_FOUND )
3431
target_link_libraries ( ${RAWTOACESLIB} PUBLIC libraw::raw )
3532
else ()
33+
target_include_directories(${RAWTOACESLIB} PUBLIC ${libraw_INCLUDE_DIR}/..)
3634
target_link_directories(${RAWTOACESLIB} PUBLIC ${libraw_LIBRARY_DIRS} )
3735
target_link_libraries(${RAWTOACESLIB} PUBLIC ${libraw_LIBRARIES} ${libraw_LDFLAGS_OTHER} )
3836
endif ()

0 commit comments

Comments
 (0)