mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 10:35:28 +08:00
a4e94e9d6d
* [rkcommon] add port * v db * Fix static builds and supports * format manifest * v db * Add usage file. --------- Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
29 lines
829 B
Diff
29 lines
829 B
Diff
diff --git a/rkcommon/CMakeLists.txt b/rkcommon/CMakeLists.txt
|
|
index 3f80e4de3..72ac948b2 100644
|
|
--- a/rkcommon/CMakeLists.txt
|
|
+++ b/rkcommon/CMakeLists.txt
|
|
@@ -55,6 +55,10 @@ endif()
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC ${EXTRA_COMPILE_DEFINITIONS})
|
|
|
|
+if(BUILD_SHARED_LIBS)
|
|
+ target_compile_definitions(${PROJECT_NAME} PUBLIC rkcommon_SHARED)
|
|
+endif()
|
|
+
|
|
if (RKCOMMON_ADDRSAN)
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC -DRKCOMMON_ADDRSAN)
|
|
endif()
|
|
diff --git a/rkcommon/common.h b/rkcommon/common.h
|
|
index 175ecfa84..b43f34ab9 100644
|
|
--- a/rkcommon/common.h
|
|
+++ b/rkcommon/common.h
|
|
@@ -26,7 +26,7 @@ typedef int ssize_t;
|
|
#include "unistd.h"
|
|
#endif
|
|
|
|
-#ifdef _WIN32
|
|
+#if defined(_WIN32) && defined(rkcommon_SHARED)
|
|
#ifdef rkcommon_EXPORTS
|
|
#define RKCOMMON_INTERFACE __declspec(dllexport)
|
|
#else
|