Files
pixelarium/cmake/libCZI.cmake
T
m-aXimilian d6a08f7db3 Atomic woes, megalinter, and batches (#13)
* fix libCZI dependency w/ atomic woes

* add megalinter

* fix megalinter triggers

* use correct flavor

* build status in readme

* clang-format

* megalinter batch

* disable suggestions

set libCZI options before fetching

Set compile definitions for static libCZI
2026-02-16 20:36:48 +01:00

25 lines
1017 B
CMake

include(FetchContent)
FetchContent_Declare(
libCZI
GIT_REPOSITORY https://github.com/ZEISS/libczi.git
GIT_TAG main
)
if(NOT libCZI_POPULATED)
message(STATUS "Fetching libCZI")
set(LIBCZI_BUILD_CZICMD OFF CACHE BOOL "Don't build commandline libCZI." FORCE)
set(LIBCZI_BUILD_DYNLIB OFF CACHE BOOL "Don't build libCZI as a shared library." FORCE)
set(LIBCZI_BUILD_UNITTESTS OFF CACHE BOOL "Don't build libCZI unit tests." FORCE)
set(LIBCZI_BUILD_PREFER_EXTERNALPACKAGE_RAPIDJSON OFF CACHE BOOL "Use internal rapidjson." FORCE)
set(LIBCZI_DO_NOT_SET_MSVC_RUNTIME_LIBRARY ON CACHE BOOL "Consumer sets the runtime." FORCE)
set(ADDITIONAL_LIBS_REQUIRED_FOR_ATOMIC "" CACHE STRING "Additional atomic libs included." FORCE)
FetchContent_MakeAvailable(libCZI)
endif()
FetchContent_GetProperties(libCZI)
set(LIBCZI_INCLUDE_DIR "${libczi_SOURCE_DIR}/Src/libCZI")
message(STATUS ${LIBCZI_INCLUDE_DIR})