vcpkg/ports/libmysql/Add-target-include-directories.patch
Cheney Wang a84a8437c9
[libmysql] Add target include directories (#25886)
Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
2022-07-22 14:38:57 -07:00

21 lines
759 B
Diff

diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 88b53e7..f49e44d 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -179,6 +179,7 @@ MACRO(MERGE_LIBRARIES_SHARED)
ADD_VERSION_INFO(${TARGET} SHARED SRC)
ENDIF()
ADD_LIBRARY(${TARGET} SHARED ${SRC})
+ TARGET_INCLUDE_DIRECTORIES(${TARGET} INTERFACE $<INSTALL_INTERFACE:include>)
IF(ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_SKIP_INSTALL)
@@ -274,6 +275,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
SET(SOURCE_FILE
${CMAKE_BINARY_DIR}/archive_output_directory/${TARGET}_depends.c)
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
+ TARGET_INCLUDE_DIRECTORIES(${TARGET} INTERFACE $<INSTALL_INTERFACE:include>)
IF(ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_SKIP_INSTALL)