-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds CI to use the optional AcesContainer library with ctlrender * adds FindAcesContainer.cmake module
- Loading branch information
1 parent
d084184
commit 3673b77
Showing
9 changed files
with
361 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
|
||
#[=======================================================================[.rst: | ||
FindAcesContainer | ||
------- | ||
|
||
Finds the AcesContainer library. | ||
|
||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module provides the following imported targets, if found: | ||
|
||
``AcesContainer::AcesContainer`` | ||
The AcesContainer library | ||
|
||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This will define the following variables: | ||
|
||
``AcesContainer_FOUND`` | ||
True if the system has the AcesContainer library. | ||
``AcesContainer_VERSION`` | ||
The version of the AcesContainer library which was found. | ||
``AcesContainer_INCLUDE_DIRS`` | ||
Include directories needed to use AcesContainer. | ||
``AcesContainer_LIBRARIES`` | ||
Libraries needed to link to AcesContainer. | ||
|
||
Cache Variables | ||
^^^^^^^^^^^^^^^ | ||
|
||
The following cache variables may also be set: | ||
|
||
``AcesContainer_INCLUDE_DIR`` | ||
The directory containing ``AcesContainer.h``. | ||
``AcesContainer_LIBRARY`` | ||
The path to the AcesContainer library. | ||
|
||
#]=======================================================================] | ||
|
||
cmake_minimum_required(VERSION 3.12) | ||
include(GNUInstallDirs) | ||
|
||
message(STATUS "running FindAcesContainer.cmake") | ||
|
||
# https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#find-modules | ||
|
||
find_package(PkgConfig) | ||
pkg_check_modules(PC_AcesContainer QUIET AcesContainer) | ||
|
||
find_path(AcesContainer_INCLUDE_DIR | ||
NAMES aces_Writer.h | ||
#PATHS ${PC_AcesContainer_INCLUDE_DIRS} | ||
PATHS /usr/local/include/ | ||
PATH_SUFFIXES aces | ||
) | ||
find_library(AcesContainer_LIBRARY | ||
NAMES AcesContainer | ||
#PATHS ${PC_AcesContainer_LIBRARY_DIRS} | ||
PATHS /usr/local/lib/ | ||
) | ||
|
||
find_library(AcesContainer_LIBRARY_RELEASE | ||
NAMES AcesContainer | ||
PATHS ${PC_AcesContainer_LIBRARY_DIRS}/Release | ||
) | ||
find_library(AcesContainer_LIBRARY_DEBUG | ||
NAMES AcesContainer | ||
PATHS ${PC_AcesContainer_LIBRARY_DIRS}/Debug | ||
) | ||
|
||
include(SelectLibraryConfigurations) | ||
select_library_configurations(AcesContainer) | ||
|
||
set(AcesContainer_VERSION ${PC_AcesContainer_VERSION}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(AcesContainer | ||
FOUND_VAR AcesContainer_FOUND | ||
REQUIRED_VARS | ||
AcesContainer_LIBRARY | ||
AcesContainer_INCLUDE_DIR | ||
VERSION_VAR AcesContainer_VERSION | ||
) | ||
|
||
if(AcesContainer_FOUND) | ||
set(AcesContainer_LIBRARIES ${AcesContainer_LIBRARY}) | ||
set(AcesContainer_INCLUDE_DIRS ${AcesContainer_INCLUDE_DIR}) | ||
set(AcesContainer_DEFINITIONS ${PC_AcesContainer_CFLAGS_OTHER}) | ||
endif() | ||
|
||
if(AcesContainer_FOUND AND NOT TARGET AcesContainer::AcesContainer) | ||
add_library(AcesContainer::AcesContainer UNKNOWN IMPORTED) | ||
set_target_properties(AcesContainer::AcesContainer PROPERTIES | ||
IMPORTED_LOCATION "${AcesContainer_LIBRARY}" | ||
INTERFACE_COMPILE_OPTIONS "${PC_AcesContainer_CFLAGS_OTHER}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${AcesContainer_INCLUDE_DIR}" | ||
) | ||
endif() | ||
|
||
if(AcesContainer_FOUND) | ||
if (NOT TARGET AcesContainer::AcesContainer) | ||
add_library(AcesContainer::AcesContainer UNKNOWN IMPORTED) | ||
endif() | ||
if (AcesContainer_LIBRARY_RELEASE) | ||
set_property(TARGET AcesContainer::AcesContainer APPEND PROPERTY | ||
IMPORTED_CONFIGURATIONS RELEASE | ||
) | ||
set_target_properties(AcesContainer::AcesContainer PROPERTIES | ||
IMPORTED_LOCATION_RELEASE "${AcesContainer_LIBRARY_RELEASE}" | ||
) | ||
endif() | ||
if (AcesContainer_LIBRARY_DEBUG) | ||
set_property(TARGET AcesContainer::AcesContainer APPEND PROPERTY | ||
IMPORTED_CONFIGURATIONS DEBUG | ||
) | ||
set_target_properties(AcesContainer::AcesContainer PROPERTIES | ||
IMPORTED_LOCATION_DEBUG "${AcesContainer_LIBRARY_DEBUG}" | ||
) | ||
endif() | ||
set_target_properties(AcesContainer::AcesContainer PROPERTIES | ||
INTERFACE_COMPILE_OPTIONS "${PC_AcesContainer_CFLAGS_OTHER}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${AcesContainer_INCLUDE_DIR}" | ||
) | ||
endif() | ||
|
||
mark_as_advanced( | ||
AcesContainer_INCLUDE_DIR | ||
AcesContainer_LIBRARY | ||
) | ||
|
||
# compatibility variables | ||
set(AcesContainer_VERSION_STRING ${AcesContainer_VERSION}) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update | ||
|
||
# disable interactive install | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# install developement tools | ||
RUN apt-get -y install cmake | ||
RUN apt-get -y install g++ | ||
RUN apt-get -y install git | ||
|
||
RUN apt-get -y install valgrind | ||
|
||
# install CTL dependencies | ||
RUN apt-get -y install libopenexr-dev | ||
RUN apt-get -y install libtiff-dev | ||
|
||
# install aces_container | ||
WORKDIR /usr/src/ | ||
RUN git clone https://github.com/ampas/aces_container.git | ||
#WORKDIR /usr/src/aces_container/build | ||
#RUN cmake .. | ||
#RUN make | ||
#RUN make install | ||
RUN cmake -S aces_container -B aces_container/build -DCMAKE_CXX_FLAGS="-Wno-c++11-narrowing" | ||
RUN cmake --build aces_container/build | ||
RUN cmake --install aces_container/build | ||
|
||
RUN apt-get -y install pkg-config | ||
|
||
# Make sudo dummy replacement, so we don't weaken docker security | ||
#RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo | ||
#RUN chmod +x /usr/bin/sudo | ||
|
||
# copy CTL repo into docker | ||
WORKDIR /usr/src/CTL | ||
COPY . . | ||
|
||
# install ACES AcesContainer using install script | ||
#WORKDIR /usr/src/ | ||
#RUN bash ./CTL/resources/scripts/install_aces_container.bash | ||
|
||
# build CTL | ||
WORKDIR /usr/src/CTL/build | ||
#RUN cmake -D CMAKE_PREFIX_PATH=/usr/local/lib/CMake/AcesContainer .. | ||
RUN cmake .. | ||
RUN make | ||
RUN make install | ||
|
||
|
||
|
||
# finalize docker environment | ||
WORKDIR /usr/src/CTL | ||
|
Oops, something went wrong.