mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
[unicorn-lib][rs-core-lib] Initial port
This commit is contained in:
parent
b899067edb
commit
4351c4a648
4
ports/rs-core-lib/CONTROL
Normal file
4
ports/rs-core-lib/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: rs-core-lib
|
||||
Version: commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5
|
||||
Description: Minimal common utilities by Ross Smith
|
||||
|
25
ports/rs-core-lib/portfile.cmake
Normal file
25
ports/rs-core-lib/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO CaptainCrowbar/rs-core-lib
|
||||
REF 1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5
|
||||
SHA512 f84803fdd26f36b2a3748b9668253f058376e19740bc85e009726142b0b1f5906423729d9b71b224a995869a428a7e1e7b1f8afae897d416d9dfc1708b41975a
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/rs-core DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/rs-core-lib RENAME copyright)
|
30
ports/unicorn-lib/CMakeLists.txt
Normal file
30
ports/unicorn-lib/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(Unicorn_Lib LANGUAGES CXX DESCRIPTION "Unicode library for C++ by Ross Smith")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
option(UNICORN_LIB_SKIP_HEADERS "If the headers installation is skipped or not." OFF)
|
||||
|
||||
find_path(RS_CORE_LIB_INCLUDE_DIR rs-core/common.hpp)
|
||||
#find_library(RW_UTILITIES_LIBRARY NAMES rw_utilities)
|
||||
|
||||
file(GLOB_RECURSE UNICORN_LIB_SOURCES ${PROJECT_SOURCE_DIR}/unicorn/*.cpp)
|
||||
foreach(ITR ${UNICORN_LIB_SOURCES})
|
||||
if(ITR MATCHES "(.*)-test.cpp(.*)")
|
||||
list(REMOVE_ITEM UNICORN_LIB_SOURCES ${ITR})
|
||||
endif()
|
||||
endforeach()
|
||||
add_library(unicorn-lib ${UNICORN_LIB_SOURCES})
|
||||
target_include_directories(
|
||||
unicorn-lib
|
||||
PUBLIC ${PROJECT_SOURCE_DIR}
|
||||
PUBLIC ${RS_CORE_LIB_INCLUDE_DIR}
|
||||
)
|
||||
target_compile_definitions(
|
||||
unicorn-lib
|
||||
PRIVATE -DUNICODE -D_UNICODE _CRT_SECURE_NO_WARNINGS
|
||||
)
|
||||
|
||||
if(NOT UNICORN_LIB_SKIP_HEADERS)
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/unicorn DESTINATION include FILES_MATCHING PATTERN "*.hpp")
|
||||
endif()
|
||||
install(TARGETS unicorn-lib DESTINATION lib)
|
4
ports/unicorn-lib/CONTROL
Normal file
4
ports/unicorn-lib/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: unicorn-lib
|
||||
Version: commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa
|
||||
Description: Unicode library for C++ by Ross Smith
|
||||
Build-Depends: rs-core-lib, pcre, zlib, libiconv
|
34
ports/unicorn-lib/portfile.cmake
Normal file
34
ports/unicorn-lib/portfile.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO CaptainCrowbar/unicorn-lib
|
||||
REF 3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa
|
||||
SHA512 5e942cf111746ef430c8a3488e7f2e554fa374ff16111439274dec376396a950e49bf816a10d6a8d97d6008edbd14350568d00664f15c1a0bd09c93450ed0554
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG
|
||||
-DUNICORN_LIB_SKIP_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/unicorn-lib RENAME copyright)
|
Loading…
Reference in New Issue
Block a user