aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2018-01-05 13:40:16 +0200
committerGitHub <noreply@github.com>2018-01-05 13:40:16 +0200
commit94a9087b8fc3dddfc62e49fb335287fdcf166e59 (patch)
tree24dc801dd9f6aee8b0cdbc8024c732270a362f79
parent0dfb113a27505f3cf897c08b3d0193c1dda143cd (diff)
parent4351c4a6484e25637c4e9efed35481291d5a3cf0 (diff)
downloadvcpkg-94a9087b8fc3dddfc62e49fb335287fdcf166e59.tar.gz
vcpkg-94a9087b8fc3dddfc62e49fb335287fdcf166e59.zip
Merge pull request #2504 from RT222/unicorn-lib
[unicorn-lib][rs-core-lib] Initial port
-rw-r--r--ports/rs-core-lib/CONTROL4
-rw-r--r--ports/rs-core-lib/portfile.cmake25
-rw-r--r--ports/unicorn-lib/CMakeLists.txt30
-rw-r--r--ports/unicorn-lib/CONTROL4
-rw-r--r--ports/unicorn-lib/portfile.cmake34
5 files changed, 97 insertions, 0 deletions
diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL
new file mode 100644
index 000000000..f19aa7914
--- /dev/null
+++ b/ports/rs-core-lib/CONTROL
@@ -0,0 +1,4 @@
+Source: rs-core-lib
+Version: commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5
+Description: Minimal common utilities by Ross Smith
+
diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake
new file mode 100644
index 000000000..78ad34335
--- /dev/null
+++ b/ports/rs-core-lib/portfile.cmake
@@ -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) \ No newline at end of file
diff --git a/ports/unicorn-lib/CMakeLists.txt b/ports/unicorn-lib/CMakeLists.txt
new file mode 100644
index 000000000..b34e04f23
--- /dev/null
+++ b/ports/unicorn-lib/CMakeLists.txt
@@ -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) \ No newline at end of file
diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL
new file mode 100644
index 000000000..ac8a96114
--- /dev/null
+++ b/ports/unicorn-lib/CONTROL
@@ -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
diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake
new file mode 100644
index 000000000..5067bcf8c
--- /dev/null
+++ b/ports/unicorn-lib/portfile.cmake
@@ -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) \ No newline at end of file