mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 07:36:01 +08:00
add libsigcpp
This commit is contained in:
parent
b280f57002
commit
df3c619b69
57
ports/libsigcpp/CMakeLists.txt
Normal file
57
ports/libsigcpp/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(libsigc++)
|
||||
|
||||
set(SIGCPP_API_VERSION 2.0)
|
||||
|
||||
add_definitions(-DSIGC_BUILD)
|
||||
|
||||
include_directories(./MSVC_Net2013) # config file for windows is there
|
||||
include_directories(.)
|
||||
|
||||
set(SICGPP_SOURCES
|
||||
sigc++/connection.cc
|
||||
sigc++/signal_base.cc
|
||||
sigc++/trackable.cc
|
||||
sigc++/adaptors/lambda/lambda.cc
|
||||
sigc++/functors/slot_base.cc)
|
||||
|
||||
add_library(sigc ${SICGPP_SOURCES})
|
||||
set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION})
|
||||
install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib)
|
||||
|
||||
if(NOT SIGCPP_SKIP_HEADERS)
|
||||
install(FILES MSVC_Net2013/sigc++config.h DESTINATION include)
|
||||
install(FILES sigc++/sigc++.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/bind.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/bind_return.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/connection.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/limit_reference.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/retype_return.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/signal.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/signal_base.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/slot.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/trackable.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/type_traits.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/visit_each.h DESTINATION include/sigc++)
|
||||
install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors)
|
||||
install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda)
|
||||
install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda)
|
||||
install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors)
|
||||
install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors)
|
||||
install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors)
|
||||
install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors)
|
||||
install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors)
|
||||
install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors)
|
||||
endif()
|
3
ports/libsigcpp/CONTROL
Normal file
3
ports/libsigcpp/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: libsigcpp
|
||||
Version: 2.10
|
||||
Description: Typesafe callback framework for C++
|
13
ports/libsigcpp/dont-import-symbols.patch
Normal file
13
ports/libsigcpp/dont-import-symbols.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/sigc++config.h b/sigc++config.h
|
||||
index e212700..8d7366e 100644
|
||||
--- a/sigc++config.h
|
||||
+++ b/sigc++config.h
|
||||
@@ -72,6 +72,8 @@
|
||||
|
||||
#endif /* !SIGC_MSC */
|
||||
|
||||
+#undef SIGC_DLL
|
||||
+
|
||||
#ifdef SIGC_DLL
|
||||
# if defined(SIGC_BUILD) && defined(_WINDLL)
|
||||
# define SIGC_API __declspec(dllexport)
|
28
ports/libsigcpp/portfile.cmake
Normal file
28
ports/libsigcpp/portfile.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz"
|
||||
FILENAME "libsigc++-2.10.0.tar.xz"
|
||||
SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG
|
||||
-DSIGCPP_SKIP_HEADERS=ON)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/dont-import-symbols.patch)
|
||||
endif()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsigcpp)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libsigcpp/COPYING ${CURRENT_PACKAGES_DIR}/share/libsigcpp/copyright)
|
Loading…
Reference in New Issue
Block a user