vcpkg/ports/console-bridge/static-macro.patch

16 lines
533 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 604b2ab..e98b51c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON)
endif()
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions(-DCONSOLE_BRIDGE_STATIC)
+endif()
+
add_library(${PROJECT_NAME} src/console.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION
${CONSOLE_BRIDGE_MAJOR_VERSION}.${CONSOLE_BRIDGE_MINOR_VERSION})