Merge pull request #1303 from davidgyu/dev_config_interface_include_fix

This commit is contained in:
Barry Fowler 2023-06-27 18:12:46 -07:00 committed by GitHub
commit f9bd7a2d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 27 deletions

View File

@ -846,6 +846,7 @@ endmacro()
#-------------------------------------------------------------------------------
# Build targets
include(GNUInstallDirs)
# if you want to build examples against installed OpenSubdiv header files,
# use OPENSUBDIV_INCLUDE_DIR.
@ -887,11 +888,9 @@ if (NOT NO_DOC)
add_subdirectory(documentation)
endif()
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.2)
#
# CMake Config.
#
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set(OPENSUBDIV_CONFIG_PATH "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
@ -917,4 +916,3 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.2)
${CMAKE_CURRENT_BINARY_DIR}/OpenSubdivConfigVersion.cmake
DESTINATION ${OPENSUBDIV_CONFIG_PATH}
)
endif()

View File

@ -141,6 +141,11 @@ if (NOT NO_LIB)
FOLDER "opensubdiv"
)
target_include_directories(osd_static_cpu
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(osd_static_cpu
${PLATFORM_CPU_LIBRARIES}
)
@ -163,6 +168,11 @@ if (NOT NO_LIB)
EXPORT_NAME osdGPU_static
CLEAN_DIRECT_OUTPUT 1)
target_include_directories(osd_static_gpu
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(osd_static_gpu
${PLATFORM_CPU_LIBRARIES} ${PLATFORM_GPU_LIBRARIES}
)
@ -204,6 +214,11 @@ if (NOT NO_LIB)
)
endif()
target_include_directories(osd_dynamic_cpu
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(osd_dynamic_cpu
${PLATFORM_CPU_LIBRARIES}
)
@ -237,6 +252,11 @@ if (NOT NO_LIB)
)
endif()
target_include_directories(osd_dynamic_gpu
INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(osd_dynamic_gpu
osd_dynamic_cpu
${PLATFORM_CPU_LIBRARIES} ${PLATFORM_GPU_LIBRARIES}