Skip to content

Commit

Permalink
[libmysql] Add target include directories (#25886)
Browse files Browse the repository at this point in the history
Co-authored-by: Cheney-Wang <[email protected]>
  • Loading branch information
Cheney-W and Cheney-Wang authored Jul 22, 2022
1 parent 31211e0 commit a84a843
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
20 changes: 20 additions & 0 deletions ports/libmysql/Add-target-include-directories.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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)
4 changes: 3 additions & 1 deletion ports/libmysql/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ vcpkg_from_github(
export-cmake-targets.patch
004-added-limits-include.patch
openssl.patch
Add-target-include-directories.patch
)

file(REMOVE_RECURSE "${SOURCE_PATH}/include/boost_1_70_0")

set(STACK_DIRECTION)
set(STACK_DIRECTION "")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(STACK_DIRECTION -DSTACK_DIRECTION=-1)
endif()

#Skip the version check for Visual Studio
set(FORCE_UNSUPPORTED_COMPILER "")
if(VCPKG_TARGET_IS_WINDOWS)
set(FORCE_UNSUPPORTED_COMPILER 1)
endif()
Expand Down
3 changes: 2 additions & 1 deletion ports/libmysql/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "libmysql",
"version": "8.0.20",
"port-version": 6,
"port-version": 7,
"description": "A MySQL client library for C development",
"homepage": "https://github.com/mysql/mysql-server",
"license": "GPL-2.0-or-later",
"supports": "!(windows & x86) & !uwp",
"dependencies": [
"boost-algorithm",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3874,7 +3874,7 @@
},
"libmysql": {
"baseline": "8.0.20",
"port-version": 6
"port-version": 7
},
"libnice": {
"baseline": "0.1.18",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmysql.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bde440f72e606ffbfcfba3393813261aa91e5c05",
"version": "8.0.20",
"port-version": 7
},
{
"git-tree": "2bc452d4f5cd5392799424e1bb920175f979dd84",
"version": "8.0.20",
Expand Down

0 comments on commit a84a843

Please sign in to comment.