diff options
| author | codicodi <rob.ceglinski@gmail.com> | 2017-06-19 21:04:18 +0200 |
|---|---|---|
| committer | codicodi <rob.ceglinski@gmail.com> | 2017-06-19 21:04:18 +0200 |
| commit | b29b05ed8cd1a850a86010dd16cd1d7e0558134d (patch) | |
| tree | 8b6f06d4b79d9e4c34f3734351a137150829b375 /ports/utf8proc/fix-buildsystem.patch | |
| parent | d25bea6987406156cab83d2f986b851782bf6c2c (diff) | |
| download | vcpkg-b29b05ed8cd1a850a86010dd16cd1d7e0558134d.tar.gz vcpkg-b29b05ed8cd1a850a86010dd16cd1d7e0558134d.zip | |
[utf8proc] initial commit
Diffstat (limited to 'ports/utf8proc/fix-buildsystem.patch')
| -rw-r--r-- | ports/utf8proc/fix-buildsystem.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ports/utf8proc/fix-buildsystem.patch b/ports/utf8proc/fix-buildsystem.patch new file mode 100644 index 000000000..17af16c9b --- /dev/null +++ b/ports/utf8proc/fix-buildsystem.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be676ba..7a2b6d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,9 +13,9 @@ set(SO_MAJOR 2) + set(SO_MINOR 1) + set(SO_PATCH 0) + +-add_definitions ( +- -DUTF8PROC_EXPORTS +-) ++if(BUILD_SHARED_LIBS) ++ add_definitions(-DUTF8PROC_EXPORTS -DUTF8PROC_SHARED) ++endif() + + if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall") +@@ -31,3 +31,10 @@ set_target_properties (utf8proc PROPERTIES + VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" + SOVERSION ${SO_MAJOR} + ) ++ ++install(TARGETS utf8proc ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES utf8proc.h DESTINATION include) +diff --git a/utf8proc.h b/utf8proc.h +index edf46d4..7b3f11a 100644 +--- a/utf8proc.h ++++ b/utf8proc.h +@@ -120,13 +120,13 @@ typedef bool utf8proc_bool; + #endif + #include <limits.h> + +-#ifdef _WIN32 ++#if defined _WIN32 && defined UTF8PROC_SHARED + # ifdef UTF8PROC_EXPORTS + # define UTF8PROC_DLLEXPORT __declspec(dllexport) + # else + # define UTF8PROC_DLLEXPORT __declspec(dllimport) + # endif +-#elif __GNUC__ >= 4 ++#elif __GNUC__ >= 4 && defined UTF8PROC_SHARED + # define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) + #else + # define UTF8PROC_DLLEXPORT |
