Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support installing and finding filament via find_package #8267

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 52 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif()
# ==================================================================================================
# Project declaration
# ==================================================================================================
project(TNT)
project(filament VERSION 1.56.0)

# ==================================================================================================
# Options
Expand Down Expand Up @@ -47,6 +47,8 @@ option(FILAMENT_ENABLE_MULTIVIEW "Enable multiview for Filament" OFF)

option(FILAMENT_SUPPORTS_OSMESA "Enable OSMesa (headless GL context) for Filament" OFF)

option(FILAMENT_INSTALL_RULES "Enable Filament's install rules" ON)

set(FILAMENT_NDK_VERSION "" CACHE STRING
"Android NDK version or version prefix to be used when building for Android."
)
Expand Down Expand Up @@ -829,7 +831,53 @@ if (IS_HOST_PLATFORM)
add_subdirectory(${TOOLS}/uberz)
endif()

# Generate exported executables for cross-compiled builds (Android, WebGL, and iOS)
if (NOT CMAKE_CROSSCOMPILING)
export(TARGETS matc cmgen filamesh mipgen resgen uberz glslminifier FILE ${IMPORT_EXECUTABLES})
if(FILAMENT_INSTALL_RULES)
# version file
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
write_basic_package_version_file("${CMAKE_BINARY_DIR}/filamentConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
install(FILES "${CMAKE_BINARY_DIR}/filamentConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/filament
COMPONENT filament)

# public header dependencies
set(HEADER_DEPS cgltf jsmn SPIRV-Headers)
foreach(_dep ${HEADER_DEPS})
get_target_property(_dep_include ${_dep} INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(${_dep} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"$<BUILD_INTERFACE:${_dep_include}>$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
endforeach()
install(TARGETS ${HEADER_DEPS} EXPORT filament-targets COMPONENT filament-dependencies)
export(TARGETS ${HEADER_DEPS}
NAMESPACE filament::
FILE "${CMAKE_BINARY_DIR}/filamentTargets-Dependencies.cmake")

# config file
set(PACKAGE_VERSION ${PROJECT_VERSION})
configure_package_config_file("${CMAKE_CURRENT_LIST_DIR}/filamentConfig.cmake.in"
"${CMAKE_BINARY_DIR}/filamentConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/filament)
install(FILES "${CMAKE_BINARY_DIR}/filamentConfig.cmake"
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/filament
COMPONENT filament)

# targets file
set(TARGETS camutils filabridge filaflat filagui filameshio uberarchive gltfio_core gltfio ibl ibl-lite filament-iblprefilter
image ktxreader math mathio uberzlib utils viewer backend backend_headers vkshaders backend_test_linux filament
shaders geometry filamat matdbg_resources matdbg bluevk bluegl imageio cmgen cso-lut filamesh glslminifier matlang
matc matinfo matedit mipgen normal-blending resgen rgb-to-lmsr roughness-prefilter specular-color uberz
getopt smol-v vkmemalloc)
install(TARGETS ${TARGETS} EXPORT filament-targets COMPONENT filament)
export(TARGETS ${TARGETS}
NAMESPACE filament::
FILE "${CMAKE_BINARY_DIR}/filamentTargets.cmake")
export(PACKAGE filament)
install(EXPORT filament-targets
NAMESPACE filament::
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/filament
FILE "filamentTargets.cmake"
COMPONENT filament)
endif()
5 changes: 4 additions & 1 deletion filament/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ include_directories(src)
add_library(${TARGET} STATIC ${PRIVATE_HDRS} ${PUBLIC_HDRS} ${SRCS} ${DATA_BINS})

# specify where the public headers of this library are
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)

# add this subproject to the Filament folder
set_target_properties(${TARGET} PROPERTIES FOLDER Filament)
Expand Down
10 changes: 8 additions & 2 deletions filament/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ include_directories(${GENERATION_ROOT})
add_library(${TARGET} STATIC ${PRIVATE_HDRS} ${PUBLIC_HDRS} ${SRCS})

# specify where the public headers of this library are
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)

# add this subproject to the Filament folder
set_target_properties(${TARGET} PROPERTIES FOLDER Filament)
Expand All @@ -264,7 +267,10 @@ set_target_properties(${TARGET} PROPERTIES FOLDER Filament)
# ==================================================================================================

add_library(${TARGET}_headers INTERFACE)
target_include_directories(${TARGET}_headers INTERFACE ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET}_headers INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)

# ==================================================================================================
# Build SPIRV snippets used by the Vulkan backend.
Expand Down
9 changes: 9 additions & 0 deletions filamentConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(filament_VERSION @PACKAGE_VERSION@)

@PACKAGE_INIT@

@PACKAGE_DEPENDENCIES@

include("${CMAKE_CURRENT_LIST_DIR}/filamentTargets.cmake")

@INCLUDED_CONTENT@
5 changes: 4 additions & 1 deletion libs/bluegl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ include_directories(${PUBLIC_HDR_DIR})
add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

# specify where the public headers of this library are
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

if (WIN32)
Expand Down
5 changes: 4 additions & 1 deletion libs/bluevk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} utils math)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# test_bluevk is not supported on mobile or Windows
Expand Down
5 changes: 4 additions & 1 deletion libs/camutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} PUBLIC math)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/filabridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ set(SRCS
include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

target_link_libraries(${TARGET} utils)
Expand Down
5 changes: 4 additions & 1 deletion libs/filaflat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ set(SRCS
include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} ${HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

target_link_libraries(${TARGET} filabridge utils)
Expand Down
5 changes: 4 additions & 1 deletion libs/filagui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS} ${RESGEN_SOURCE})

target_link_libraries(${TARGET} PUBLIC imgui filament)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/filamat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ include_directories(${CMAKE_BINARY_DIR})

# Filamat
add_library(${TARGET} STATIC ${HDRS} ${PRIVATE_HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET} backend_headers shaders filabridge utils smol-v)

Expand Down
5 changes: 4 additions & 1 deletion libs/filamentapp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} PUBLIC ${LIBS} filamentapp-resources)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_include_directories(${TARGET} PRIVATE ${GENERATION_ROOT})

Expand Down
5 changes: 4 additions & 1 deletion libs/filameshio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ set(SRCS src/MeshReader.cpp)
# ==================================================================================================
include_directories(${PUBLIC_HDR_DIR})
add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET}
PRIVATE meshoptimizer
Expand Down
5 changes: 4 additions & 1 deletion libs/geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ set(GEOMETRY_DEPS
target_link_libraries(${TARGET} PUBLIC math utils)
target_link_libraries(${TARGET} PRIVATE ${GEOMETRY_DEPS})

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
15 changes: 12 additions & 3 deletions libs/gltfio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c")
add_custom_command(OUTPUT ${DUMMY_SRC} COMMAND echo "//" > ${DUMMY_SRC})

add_library(uberarchive ${DUMMY_SRC} ${RESGEN_SOURCE})
target_include_directories(uberarchive PUBLIC ${RESOURCE_DIR})
target_include_directories(uberarchive PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(uberarchive PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand All @@ -186,7 +189,10 @@ link_libraries(math utils filament cgltf stb ktxreader geometry tsl uberzlib)

add_library(gltfio_core STATIC ${PUBLIC_HDRS} ${SRCS})

target_include_directories(gltfio_core PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(gltfio_core PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(gltfio_core PROPERTIES FOLDER Libs)

target_compile_definitions(gltfio_core PUBLIC -DGLTFIO_DRACO_SUPPORTED=1)
Expand All @@ -213,7 +219,10 @@ if (NOT WEBGL AND NOT ANDROID AND NOT IOS)
# ==================================================================================================
add_library(${TARGET} STATIC ${PUBLIC_HDRS} src/JitShaderProvider.cpp)
target_link_libraries(${TARGET} PUBLIC filamat gltfio_core)
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
if (NOT MSVC)
target_compile_options(${TARGET} PRIVATE -Wno-deprecated-register)
Expand Down
10 changes: 8 additions & 2 deletions libs/ibl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,19 @@ set(SRCS
include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET} math utils)

add_library(${TARGET}-lite ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS})
target_compile_definitions(${TARGET}-lite PUBLIC -DFILAMENT_IBL_LITE=1)
target_include_directories(${TARGET}-lite PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET}-lite PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET}-lite PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET}-lite math utils)

Expand Down
5 changes: 4 additions & 1 deletion libs/iblprefilter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ include_directories(src)
add_library(${TARGET} STATIC ${PRIVATE_HDRS} ${PUBLIC_HDRS} ${SRCS})

# specify where the public headers of this library are
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} PUBLIC math utils)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/imageio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

target_link_libraries(${TARGET} PUBLIC image math png tinyexr utils z basis_encoder)
Expand Down
5 changes: 4 additions & 1 deletion libs/ktxreader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} PUBLIC utils image filament basis_transcoder)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/matdbg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ target_link_libraries(${TARGET} PUBLIC

target_include_directories(${TARGET} PRIVATE ${filamat_SOURCE_DIR}/src)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
5 changes: 4 additions & 1 deletion libs/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})
target_compile_options(${TARGET} PRIVATE ${OPTIMIZATION_FLAGS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
6 changes: 4 additions & 2 deletions libs/mathio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ include_directories(${PUBLIC_HDR_DIR})

add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})
target_compile_options(${TARGET} PRIVATE ${OPTIMIZATION_FLAGS})
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET} PRIVATE math)

# ==================================================================================================
# Installation
# ==================================================================================================
install(DIRECTORY ${PUBLIC_HDR_DIR}/mathio DESTINATION include)

5 changes: 4 additions & 1 deletion libs/uberz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})

target_link_libraries(${TARGET} PUBLIC math utils filabridge zstd)

target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_include_directories(${TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${PUBLIC_HDR_DIR}>
$<INSTALL_INTERFACE:${PUBLIC_HDR_DIR}>
)
set_target_properties(${TARGET} PROPERTIES FOLDER Libs)

# ==================================================================================================
Expand Down
Loading
Loading