Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
908993f
Add bits/macos-infra branch to CI workflow
philippremy Apr 16, 2026
8fea92d
Update CI workflow to use macos-infra-v2 branch
philippremy Apr 16, 2026
85e505b
FEAT: Update OptimizeForArchitecture
philippremy Sep 2, 2025
787ec6f
FIX: Unified handling of OpenMP
philippremy Sep 2, 2025
d676075
FEAT: Add support for building Apple Frameworks
philippremy Sep 2, 2025
8fef089
FIX: Executable file names
philippremy Sep 2, 2025
95af520
FIX: Remove any CUDA logic on Apple targets
philippremy Sep 7, 2025
f108b8e
PATCH: CMake: Introduce av_conditional_option
philippremy Apr 15, 2026
5549c3e
FEAT: Dependencies: Allow building OpenMP
philippremy Apr 15, 2026
075d01b
FIX: Dependencies: Disable PopSIFT on Darwin
philippremy Apr 15, 2026
280f4d4
PATCH: Dependencies: Do not build BLAS/LAPACK and SuiteSparse on Appl…
philippremy Apr 15, 2026
656f8de
PATCH: Dependencies: Disable SuiteSparse when building an embedded Ce…
philippremy Apr 15, 2026
acd230f
PATCH: Dependencies: Use CMAKE_OSX_ARCHITECTURES when building an emb…
philippremy Apr 15, 2026
117bffe
FIX: Dependencies: Bump version for libPNG
philippremy Apr 15, 2026
432ac8d
FIX: Dependencies: Bump version of libVPX
philippremy Apr 15, 2026
39fd5d9
PATCH: Dependencies: When fetching ONNXRuntime, match the specified O…
philippremy Apr 15, 2026
17aa025
FEAT: Dependencies: Allow building an embedded XercesC library
philippremy Apr 15, 2026
36cc395
FIX: Dependencies: Bump version of pcl
philippremy Apr 15, 2026
17a1d34
PATCH: Build SWIG without PCRE2
philippremy Apr 15, 2026
e320893
FIX: libvpx: Apple specific configure flags
philippremy Apr 15, 2026
764a9b9
PATCH: Dependencies: Bump Boost and switch to CMake
philippremy Apr 15, 2026
b08e311
PATCH: Dependencies: Do not build tests for Ceres
philippremy Apr 15, 2026
b5b0ad4
PATCH: Dependencies: Add rpath handling to CMAKE_CORE_BUILD_FLAGS
philippremy Apr 15, 2026
d39883f
FIX: AliceVision configure variables
philippremy Apr 15, 2026
129fa5c
FIX: Utils: Remove wrong link from aliceVision_selectConnectedViews
philippremy Apr 15, 2026
3ecb901
FIX: Use common rpaths on Apple targets
philippremy Sep 7, 2025
edf8d87
FEAT: Allow cross-compilation on macOS
philippremy Apr 15, 2026
08b3d84
FIX: Dependencies: Explicitly set ffmpegs install name directory to @…
philippremy Apr 15, 2026
d0cd098
FIX: Dependencies: Explicitly use "-headerpad_max_install_names" on A…
philippremy Apr 15, 2026
1294d9f
PATCH: Ceres components on Apple platforms
philippremy Apr 15, 2026
71d7707
PATCH: Respect CMAKE_OSX_ARCHITECTURES when setting the build directo…
philippremy Oct 8, 2025
bf37044
PATCH: Build: Add a bundling solution for Apple targets
philippremy Apr 15, 2026
9a6195e
PATCH: Add build instructions for macOS
philippremy Oct 9, 2025
35de89a
FIX: SWIG Bindings: Adapt for Apple ld
philippremy Apr 15, 2026
2eac610
FIX: Dependencies: Pass BUILD_SHARED_LIBS to dependencies
philippremy Apr 16, 2026
1edf848
FIX: CMake: Use CMAKE_SOURCE_DIR instead of ALICEVISION_ROOT
philippremy Apr 16, 2026
79639fa
FIX: Bump version of OpenImageIO
philippremy Apr 16, 2026
56cb8a6
FIX: Explicitly disable GPU backends for PXR
philippremy Apr 16, 2026
a7166a1
PATCH: Use current upstream tag of CCTag
philippremy Apr 16, 2026
298b71a
FIX: Force liblemon to build statically and with C++14
philippremy Apr 16, 2026
dfc226d
FIX: Dependency Orchestrator: Build AliceVision in parallel
philippremy Apr 16, 2026
5c0be34
FIX: Dependencies: Build OpenMesh with CMAKE_CORE_BUILD_FLAGS
philippremy Apr 16, 2026
647b5c0
DOCS: Clarify Python details
philippremy Apr 16, 2026
5ce2f2f
FIX: Darwin Bundle: Ensure Python is available
philippremy Apr 16, 2026
8ef64d1
PATCH: Add SWIG binary patcher for Darwin bundle
philippremy Apr 16, 2026
d718c61
FIX: Darwin Bundle: Simplify complex functions
philippremy Apr 16, 2026
5d9511f
Update DockerFile for updated cmake
Apr 20, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- develop
- bits/macos-infra-v2
# Skip jobs when only documentation files are changed
paths-ignore:
- '**.md'
Expand Down
36 changes: 30 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
cmake_minimum_required(VERSION 3.30)
project(aliceVision LANGUAGES C CXX)

include(CMakeDependentOption)

# Initialize CMAKE_OSX_ARCHITECTURES, if not specified on the command line.
if(APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
message(STATUS "Host processor: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")
set(CMAKE_OSX_ARCHITECTURES "arm64")
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
else()
message(FATAL_ERROR "CMAKE_HOST_SYSTEM_PROCESSOR was neither arm64 nor x86_64 on an Apple platform and CMAKE_OSX_ARCHITECTURES was not specified!")
endif()
endif()

option(ALICEVISION_BUILD_DEPENDENCIES "Build all AliceVision dependencies" OFF)
option(ALICEVISION_USE_RPATH "Add RPATH on software with relative paths to libraries" ON)
option(AV_BUILD_ALICEVISION "Enable building of AliceVision" ON)
option(AV_EIGEN_MEMORY_ALIGNMENT "Enable Eigen memory alignment" ON)
option(ALICEVISION_BUILD_TESTS "Build AliceVision tests" OFF)
option(AV_USE_CUDA "Enable CUDA" ON)
option(AV_USE_OPENMP "Enable OpenMP" $<$<CXX_COMPILER_ID:"AppleClang">,OFF,ON>) # disable by default for AppleClang
option(AV_USE_OPENMP "Enable OpenMP" ON) # AppleClang now supports OpenMP, if installed as an external dependency (Homebrew, MacPorts, ...)
cmake_dependent_option(AV_USE_CUDA "Enable CUDA support" ON "NOT APPLE" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
if(APPLE AND BUILD_SHARED_LIBS)
option(BUILD_APPLE_FRAMEWORKS "Create Frameworks instead of plain dynamic libraries on macOS" ON)
endif()
option(ALICEVISION_INSTALL_MESHROOM_PLUGIN "Install AliceVision's plugin for Meshroom" ON)

# Global policy section
Expand All @@ -17,6 +35,12 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type for AliceVision" FORCE)
endif()

# Currently no universal binaries are supported. Fail early.
# FIXME: Enable universal builds by adapting dependency building accordingly.
if(APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "arm64" AND CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
message(FATAL_ERROR "Building universal binaries is currently not supported. Please set 'CMAKE_OSX_ARCHITECTURES' to either arm64 (Apple Silicon) or x86_64 (Intel)!")
endif()

# set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type for AliceVision")
set(DEPS_CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type for all external libraries (only used if ALICEVISION_BUILD_DEPENDENCIES=ON)")
string(TOLOWER ${DEPS_CMAKE_BUILD_TYPE} DEPS_CMAKE_BUILD_TYPE_LOWERCASE)
Expand Down Expand Up @@ -78,10 +102,10 @@ else()
add_subdirectory(src)

install(
FILES
LICENSE-MPL2.md
LICENSE-MIT-libmv.md
COPYING.md
FILES
LICENSE-MPL2.md
LICENSE-MIT-libmv.md
COPYING.md
CONTRIBUTORS.md
DESTINATION ${CMAKE_INSTALL_DATADIR}/aliceVision
)
Expand Down
21 changes: 2 additions & 19 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# AliceVision

For specific build instructions for macOS see [INSTALL_macOS.md](./INSTALL_macOS.md).

## Build instructions

Required tools:
Expand Down Expand Up @@ -357,25 +359,6 @@ make test
* Change the target to Release.
* Compile the libraries and binaries samples.


### Mac OSX compilation

```bash
git clone --recursive https://github.com/alicevision/AliceVision.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -G "Xcode" ../AliceVision
```

If you want to enable the build of the unit tests:
```bash
cmake -DCMAKE_BUILD_TYPE=Release \
-DALICEVISION_BUILD_TESTS=ON \
-G "Xcode" \
../AliceVision
xcodebuild -configuration Release
```


## Using AliceVision as a third party library dependency in CMake

AliceVision can be used as a third party library once it has been installed.
Expand Down
196 changes: 196 additions & 0 deletions INSTALL_macOS.md

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions docker/Dockerfile_rocky_deps
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ RUN CPU_CORES=$(${AV_DEV}/docker/check-cpu.sh) && \
# Docker layer cache reuse.
# =============================================================================
COPY CMakeLists.txt ${AV_DEV}/
COPY src/cmake/Dependencies.cmake \
src/cmake/DependenciesVersions.cmake \
src/cmake/Helpers.cmake \
${AV_DEV}/src/cmake/
COPY src/cmake/ ${AV_DEV}/src/cmake/
COPY src/cmake/deps/ ${AV_DEV}/src/cmake/deps/
COPY src/cmake/OFA/ ${AV_DEV}/src/cmake/OFA/
COPY dl/deps ${AV_BUILD}/external/download/

# =============================================================================
Expand Down
7 changes: 3 additions & 4 deletions docker/Dockerfile_ubuntu_deps
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ RUN CPU_CORES=$(${AV_DEV}/docker/check-cpu.sh) && \
# Docker layer cache reuse.
# =============================================================================
COPY CMakeLists.txt ${AV_DEV}/
COPY src/cmake/Dependencies.cmake \
src/cmake/DependenciesVersions.cmake \
src/cmake/Helpers.cmake \
${AV_DEV}/src/cmake/
COPY src/cmake/ ${AV_DEV}/src/cmake/
COPY src/cmake/deps/ ${AV_DEV}/src/cmake/deps/
COPY src/cmake/OFA/ ${AV_DEV}/src/cmake/OFA/
COPY dl/deps ${AV_BUILD}/external/download/


# =============================================================================
# Configure + build all dependencies
#
Expand Down
112 changes: 92 additions & 20 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.30)
message("CMake version: ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")

include(${CMAKE_CURRENT_LIST_DIR}/cmake/ConditionalOption.cmake)

include(CMakeDependentOption)

# ==============================================================================
# AliceVision version
# ==============================================================================
Expand Down Expand Up @@ -67,7 +71,11 @@ trilean_option(ALICEVISION_USE_ALEMBIC "Enable Alembic I/O" AUTO)
trilean_option(ALICEVISION_USE_UNCERTAINTYTE "Enable Uncertainty computation" AUTO)
trilean_option(ALICEVISION_USE_ONNX "Enable ONNX Runtime" AUTO)
option(ALICEVISION_USE_ONNX_GPU "Use CUDA with ONNX Runtime" ON)
trilean_option(ALICEVISION_USE_CUDA "Enable CUDA" ON)
if(APPLE)
trilean_option(ALICEVISION_USE_CUDA "Enable CUDA" OFF)
else()
trilean_option(ALICEVISION_USE_CUDA "Enable CUDA" ON)
endif()
trilean_option(ALICEVISION_USE_OPENCV "Enable use of OpenCV algorithms" OFF)
trilean_option(ALICEVISION_USE_OPENCV_CONTRIB "Enable use of OpenCV algorithms from extra modules" AUTO)
trilean_option(ALICEVISION_USE_USD "Enable USD" AUTO)
Expand All @@ -76,7 +84,10 @@ mark_as_advanced(FORCE ALICEVISION_USE_OCVSIFT)

option(ALICEVISION_USE_MESHSDFILTER "Use MeshSDFilter library (enable MeshDenoising and MeshDecimate)" ON)

option(ALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE "Require Ceres with SuiteSparse (ensure best performances)" ON)
# Apple users *could* technically still want SuiteSparse, so let them overwrite that
# Non-Apple users can never use Accelerate.framework, hard-disable and hide it for them
av_conditional_option(ALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE "Require Ceres with SuiteSparse (ensure best performance)" IF "NOT APPLE" THEN ON ELSE OFF)
cmake_dependent_option(ALICEVISION_REQUIRE_CERES_WITH_ACCELERATESPARSE "Require Ceres with Accelerate.framework (ensure best performance)" ON "APPLE" OFF)

option(ALICEVISION_USE_RPATH "Add RPATH on software with relative paths to libraries" ON)
option(ALICEVISION_REMOVE_ABSOLUTE "Remove absolute paths in dependencies" OFF)
Expand Down Expand Up @@ -121,16 +132,32 @@ endif()
if (ALICEVISION_USE_RPATH)
if (APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path")
set(CMAKE_INSTALL_RPATH
"@loader_path/../${CMAKE_INSTALL_LIBDIR}"
"@loader_path"
"@loader_path/.." # For SWIG .so files, which do not get fixed up
"@loader_path/../lib"
"@loader_path/../Libraries"
"@loader_path/../Frameworks"
"@executable_path/../${CMAKE_INSTALL_LIBDIR}"
"@executable_path/../lib"
"@executable_path/../Libraries"
"@executable_path/../Frameworks"
)
elseif (UNIX)
set(CMAKE_INSTALL_RPATH "\\$ORIGIN/../${CMAKE_INSTALL_LIBDIR};\\$ORIGIN")
endif()
endif()


# Set build path
set(EXECUTABLE_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set(LIBRARY_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
if(APPLE)
set(EXECUTABLE_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_OSX_ARCHITECTURES}")
set(LIBRARY_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_OSX_ARCHITECTURES}")
else()
set(EXECUTABLE_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set(LIBRARY_OUTPUT_PATH "${ALICEVISION_ROOT}/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
endif()

# Windows specific defines
if (WIN32)
Expand Down Expand Up @@ -188,14 +215,21 @@ endmacro(add_target_properties)
# ==============================================================================
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(OptimizeForArchitecture)
include(OFA/OptimizeForArchitecture)
OptimizeForArchitecture()
set(ALICEVISION_HAVE_SSE 0)
if (SSE2_FOUND OR TARGET_ARCHITECTURE STREQUAL "native")
set(ALICEVISION_HAVE_SSE 0 CACHE BOOL "SSE2 is available" FORCE)
if (USE_SSE2 OR TARGET_ARCHITECTURE STREQUAL "native")
if (MSVC AND NOT ${CMAKE_CL_64})
add_definitions(/arch:SSE2)
endif()
set(ALICEVISION_HAVE_SSE 1)
set(ALICEVISION_HAVE_SSE 1 CACHE BOOL "SSE2 is available" FORCE)
endif()
set(ALICEVISION_HAVE_AVX 0 CACHE BOOL "AVX is available" FORCE)
if(USE_AVX OR TARGET_ARCHITECTURE STREQUAL "native")
if (MSVC AND NOT ${CMAKE_CL_64})
add_definitions(/arch:AVX)
endif()
set(ALICEVISION_HAVE_AVX 1 CACHE BOOL "AVX is available" FORCE)
endif()

if (UNIX)
Expand Down Expand Up @@ -223,6 +257,7 @@ endif()
# allocation feature with a separate flag, so use it if alignment is enabled in Eigen.
# See https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html
if (AV_EIGEN_MEMORY_ALIGNMENT)
include(AddCompilerFlag)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.1)
AddCompilerFlag("-faligned-new")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
Expand Down Expand Up @@ -257,7 +292,7 @@ else() # ON OR AUTO
if (MSVC)
set(OpenMP_RUNTIME_MSVC "llvm")
endif()
find_package(OpenMP)
find_package(OpenMP COMPONENTS C CXX)

if (OPENMP_FOUND)
set(ALICEVISION_HAVE_OPENMP 1)
Expand All @@ -271,16 +306,9 @@ else() # ON OR AUTO
endif()

if (ALICEVISION_HAVE_OPENMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if (NOT MSVC)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# for those using the clang with OpenMP support
list(APPEND ALICEVISION_LIBRARY_DEPENDENCIES omp)
else()
list(APPEND ALICEVISION_LIBRARY_DEPENDENCIES gomp)
endif()
endif()
set(ALICEVISION_OPENMP_CXX_TARGETS OpenMP::OpenMP_CXX)
set(ALICEVISION_OPENMP_C_TARGETS OpenMP::OpenMP_C)
list(APPEND ALICEVISION_LIBRARY_DEPENDENCIES OpenMP::OpenMP_CXX)
endif()

# ==============================================================================
Expand Down Expand Up @@ -427,6 +455,9 @@ if (ALICEVISION_BUILD_SFM)
if (ALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE)
message(STATUS "By default, Ceres required SuiteSparse to ensure best performances. if you explicitly need to build without it, you can use the option: -DALICEVISION_REQUIRE_CERES_WITH_SUITESPARSE=OFF")
find_package(Ceres QUIET REQUIRED COMPONENTS SuiteSparse CONFIG)
elseif(ALICEVISION_REQUIRE_CERES_WITH_ACCELERATESPARSE)
message(STATUS "By default, Ceres required Accelerate.framework to ensure best performances. if you explicitly need to build without it, you can use the option: -DALICEVISION_REQUIRE_CERES_WITH_ACCELERATESPARSE=OFF")
find_package(Ceres QUIET REQUIRED COMPONENTS AccelerateSparse CONFIG)
else()
find_package(Ceres CONFIG QUIET CONFIG)
endif()
Expand Down Expand Up @@ -1006,6 +1037,9 @@ add_subdirectory(dependencies)
# AliceVision modules
# ==============================================================================

# Initial global target list is empty, will be added by target helper functions
set(ALICEVISION_GLOBAL_TARGET_LIST "" CACHE INTERNAL "Global list of all AliceVision targets enabled")

# software(s) under patent or commercial licence
# Included for research purpose only
if (ALICEVISION_BUILD_SFM)
Expand Down Expand Up @@ -1079,3 +1113,41 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
endif()

add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${cmakeUninstallFile}")

# ==============================================================================
# Bundling on Apple targets
# ==============================================================================
# Get output file name for each target
if(APPLE)
set(ALICEVISION_BUILD_ARTIFACTS)
foreach(AV_TARGET ${ALICEVISION_GLOBAL_TARGET_LIST})
# Different handling if Framework
get_target_property(IS_FRAMEWORK ${AV_TARGET} FRAMEWORK)
if(IS_FRAMEWORK)
list(APPEND ALICEVISION_BUILD_ARTIFACTS "$<TARGET_BUNDLE_DIR:${AV_TARGET}>")
else()
list(APPEND ALICEVISION_BUILD_ARTIFACTS "$<TARGET_FILE:${AV_TARGET}>")
endif()
endforeach()

# If the user chose not to use SWIG bindings, Python3 might not be found yet
# This is system-provided on Apple, so we can safely rely on its existence
if(NOT DEFINED Python3_EXECUTABLE)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
endif()

# Add a custom target
add_custom_target(darwin-bundle
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/cmake/darwin_bundle.py -o ${ALICEVISION_BUNDLE_PREFIX} ${ALICEVISION_BUILD_ARTIFACTS}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/aliceVision ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_DATADIR}/aliceVision
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/meshroom ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_DATADIR}/meshroom
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/aliceVision ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/aliceVision
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/aliceVision_dependencies ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/aliceVision_dependencies
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/pyalicevision ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/pyalicevision
COMMAND ${CMAKE_CURRENT_LIST_DIR}/cmake/PatchSWIGBinaries.sh ${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/pyalicevision
COMMAND ${CMAKE_COMMAND} -DAV_BUNDLE_BINARY_DIR=${ALICEVISION_BUNDLE_PREFIX}/${CMAKE_INSTALL_BINDIR} -P ${CMAKE_CURRENT_LIST_DIR}/cmake/RecreateSymlinksInBundle.cmake
DEPENDS ${ALICEVISION_GLOBAL_TARGET_LIST}
COMMENT "Creating Darwin Bundle"
COMMAND_EXPAND_LISTS
)
endif()
1 change: 1 addition & 0 deletions src/aliceVision/lensCorrectionProfile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ alicevision_add_library(aliceVision_lensCorrectionProfile
PRIVATE_LINKS
Boost::log
expat::expat
${ALICEVISION_OPENMP_CXX_TARGETS}
)
1 change: 1 addition & 0 deletions src/aliceVision/system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ alicevision_add_library(aliceVision_system
Boost::system
Boost::date_time
${ALICEVISION_NVTX_LIBRARY}
${ALICEVISION_OPENMP_CXX_TARGETS}
PRIVATE_LINKS
Boost::boost
)
Expand Down
34 changes: 34 additions & 0 deletions src/cmake/ConditionalOption.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# A helper function which allows setting a regular CMake option conditionally
#
# Why would I want this? Because cmake_dependent_option *hard* disables the
# option, even if the user has a legitimate reason to manually overwrite it.
# This function sets a reasonable default based on the given conditions, but
# allows the user to overwrite it using the CLI/TUI/GUI.
#
# Call signature:
# av_conditional_option(<OPT_NAME> <DESCRIPTION> IF <CONDITION> THEN <BOOL> ELSE <BOOL>)
function(av_conditional_option)

# Parse first two unnamed args
set(_co_OPT_NAME ${ARGV0})
set(_opt_DESCRIPTION ${ARGV1})

# Parse remaining args
set(_co_OPTIONS)
set(_co_OV_ARGS THEN ELSE)
set(_co_MV_ARGS IF)
cmake_parse_arguments(PARSE_ARGV 2 _co ${_co_OPTIONS} ${_co_OV_ARGS} ${_co_MV_ARGS})

# Do not set if the variable is already defined (i.e., provided by the
# command line)
if(DEFINED ${_co_OPT_NAME})
return()
endif()

if(${_co_IF})
option(${_co_OPT_NAME} ${_opt_DESCRIPTION} ${_co_THEN})
else()
option(${_co_OPT_NAME} ${_opt_DESCRIPTION} ${_co_ELSE})
endif()

endfunction()
Loading
Loading