diff --git a/libheif/CMakeLists.txt b/libheif/CMakeLists.txt index 359cb15032..82ca993786 100644 --- a/libheif/CMakeLists.txt +++ b/libheif/CMakeLists.txt @@ -131,8 +131,7 @@ endif () option(ENABLE_EXPERIMENTAL_FEATURES "Compile experimental features and install headers with unstable API" OFF) if (ENABLE_EXPERIMENTAL_FEATURES) - list(APPEND libheif_sources api/libheif/heif_experimental.h - api/libheif/heif_experimental.cc) + target_sources(heif PRIVATE api/libheif/heif_experimental.h api/libheif/heif_experimental.cc) list(APPEND libheif_headers api/libheif/heif_experimental.h)