Skip to content

Commit 7e096e3

Browse files
committed
CMake: Export GDAL library targets
1 parent 188cea5 commit 7e096e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gdal.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,11 @@ install(
553553
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
554554
FRAMEWORK DESTINATION "${FRAMEWORK_DESTINATION}")
555555

556+
# Generate targets file for importing directly from GDAL build tree
557+
export(TARGETS ${GDAL_LIB_TARGET_NAME}
558+
NAMESPACE GDAL::
559+
FILE "GDAL-targets.cmake")
560+
556561
if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK)
557562
# Generate GdalConfig.cmake and GdalConfigVersion.cmake
558563
install(

0 commit comments

Comments
 (0)