mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 11:49:05 +08:00
Adaptation for so-5.5.20-beta1
This commit is contained in:
parent
705c8f2012
commit
50e34d957d
@ -1,36 +0,0 @@
|
||||
diff --git a/so_5/CMakeLists.txt b/so_5/CMakeLists.txt
|
||||
index bd6f1d7..0e30831 100644
|
||||
--- a/so_5/CMakeLists.txt
|
||||
+++ b/so_5/CMakeLists.txt
|
||||
@@ -71,12 +71,17 @@ set(SO_5_SRC exception.cpp
|
||||
disp/prio_dedicated_threads/one_per_prio/pub.cpp
|
||||
)
|
||||
|
||||
-add_library(${SO_5_TARGET} SHARED ${SO_5_SRC})
|
||||
+if (SO_BUILD_STATIC)
|
||||
+ message(STATUS "Building static.")
|
||||
+ add_library(${SO_5_TARGET} STATIC ${SO_5_SRC})
|
||||
+ target_compile_definitions(${SO_5_TARGET}
|
||||
+ PUBLIC -DSO_5_STATIC_LIB
|
||||
+ )
|
||||
+else()
|
||||
+ message(STATUS "Building dynamic.")
|
||||
+ add_library(${SO_5_TARGET} SHARED ${SO_5_SRC})
|
||||
+endif()
|
||||
|
||||
-add_library(${SO_5_S_TARGET} STATIC ${SO_5_SRC})
|
||||
-target_compile_definitions(${SO_5_S_TARGET}
|
||||
- PUBLIC -DSO_5_STATIC_LIB
|
||||
-)
|
||||
|
||||
set(SO_5_EXT_LIBS )
|
||||
if( ANDROID )
|
||||
@@ -90,7 +95,7 @@ foreach(__extLibrary ${SO_5_EXT_LIBS})
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
- TARGETS ${SO_5_TARGET} ${SO_5_S_TARGET}
|
||||
+ TARGETS ${SO_5_TARGET}
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
@ -1,3 +1,3 @@
|
||||
Source: sobjectizer
|
||||
Version: 5.5.19.2-1
|
||||
Version: 5.5.20-beta1-201712061845
|
||||
Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels.
|
||||
|
@ -1,50 +1,35 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(VERSION 5.5.19.2)
|
||||
set(VERSION 5.5.20-beta1-201712061845)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://downloads.sourceforge.net/project/sobjectizer/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip"
|
||||
FILENAME "so-${VERSION}.tar.xz"
|
||||
SHA512 8f70e751766ea43ddbc8e633aa729b81f01b84b7e3d4faf237e77a61dabe60bb1aaad8dabb868db4e473d801f5a639eb3d12aa8180feacb894f7a99b08375291
|
||||
URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip"
|
||||
FILENAME "so-${VERSION}.zip"
|
||||
SHA512 8b0dbec88d6783856cc75d8a71ae4b2c6620d77160c860ae1c6d16c1f8f8113dc4a86574a5ada6946444e8c8460c2a3861359a6c8743e1f98a93cea1871a6bb8
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/001-cmake.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(SO_BUILD_STATIC ON)
|
||||
set(SO_BUILD_SHARED OFF)
|
||||
set(SOBJECTIZER_BUILD_STATIC ON)
|
||||
set(SOBJECTIZER_BUILD_SHARED OFF)
|
||||
else()
|
||||
set(SO_BUILD_STATIC OFF)
|
||||
set(SO_BUILD_SHARED ON)
|
||||
set(SOBJECTIZER_BUILD_STATIC OFF)
|
||||
set(SOBJECTIZER_BUILD_SHARED ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSO_BUILD_STATIC=${SO_BUILD_STATIC}
|
||||
-DSO_BUILD_SHARED=${SO_BUILD_SHARED}
|
||||
-DSOBJECTIZER_BUILD_STATIC=${SOBJECTIZER_BUILD_STATIC}
|
||||
-DSOBJECTIZER_BUILD_SHARED=${SOBJECTIZER_BUILD_SHARED}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# patch SO_5_STATIC_LIB in headers with actual value
|
||||
set(DECLSPEC_FILE ${CURRENT_PACKAGES_DIR}/include/so_5/h/declspec.hpp)
|
||||
file(READ ${DECLSPEC_FILE} DECLSPEC_H)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
string(REPLACE "defined( SO_5_STATIC_LIB )" "1" DECLSPEC_H "${DECLSPEC_H}")
|
||||
else()
|
||||
string(REPLACE "defined( SO_5_STATIC_LIB )" "0" DECLSPEC_H "${DECLSPEC_H}")
|
||||
endif()
|
||||
file(WRITE ${DECLSPEC_FILE} "${DECLSPEC_H}")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sobjectizer")
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer)
|
||||
|
Loading…
Reference in New Issue
Block a user