Skip to content

Commit 99d11c3

Browse files
committed
Use custom posix triplets for installation of ICU as dynamic library
1 parent 17aa6fe commit 99d11c3

10 files changed

Lines changed: 52 additions & 5 deletions

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
```
1717
1818
### Build
19-
- If .cpp files are added, it's necessary to run `./gen-linux-debug.sh` (non-Windows) or `gen-windows.bat` (Windows) from the repo root.
19+
- If .cpp files are added, it's necessary to run `./gen-linux-x64-debug.sh` (non-Windows) or `gen-windows.bat` (Windows) from the repo root.
2020
- Use `cmake --build build/Debug/` (non-Windows) or `cmake --build build --config Debug` (Windows) from the repo root.
2121
2222
### Tests

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.18)
33
set(VCPKG_ROOT "vcpkg")
44
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
55

6+
if(NOT DEFINED VCPKG_OVERLAY_TRIPLETS)
7+
set(VCPKG_OVERLAY_TRIPLETS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/triplets" CACHE STRING "")
8+
endif()
9+
610
set(CMAKE_CXX_STANDARD 20)
711
set(CMAKE_CXX_STANDARD_REQUIRED ON)
812
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(VCPKG_TARGET_ARCHITECTURE arm64)
2+
set(VCPKG_CRT_LINKAGE dynamic)
3+
set(VCPKG_LIBRARY_LINKAGE static)
4+
5+
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
6+
set(VCPKG_OSX_ARCHITECTURES arm64)
7+
8+
if(PORT MATCHES "^(icu)$")
9+
set(VCPKG_LIBRARY_LINKAGE dynamic)
10+
endif()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set(VCPKG_TARGET_ARCHITECTURE x64)
2+
set(VCPKG_CRT_LINKAGE dynamic)
3+
set(VCPKG_LIBRARY_LINKAGE static)
4+
5+
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
6+
7+
if(PORT MATCHES "^(icu)$")
8+
set(VCPKG_LIBRARY_LINKAGE dynamic)
9+
endif()

gen-linux-debug.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

gen-linux-release.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

gen-linux-x64-debug.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
cmake -S . -B build/Debug \
3+
-DCMAKE_BUILD_TYPE=Debug \
4+
-DCMAKE_VERBOSE_MAKEFILE=ON \
5+
-DVCPKG_TARGET_TRIPLET=x64-linux-custom \
6+
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
7+
-G Ninja

gen-linux-x64-release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
cmake -S . -B build/Release \
3+
-DCMAKE_BUILD_TYPE=Release \
4+
-DCMAKE_VERBOSE_MAKEFILE=ON \
5+
-DVCPKG_TARGET_TRIPLET=x64-linux-custom \
6+
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
7+
-G Ninja

gen-osx-arm64-debug.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
cmake -S . -B build/Debug \
3+
-DCMAKE_BUILD_TYPE=Debug \
4+
-DCMAKE_VERBOSE_MAKEFILE=ON \
5+
-DVCPKG_TARGET_TRIPLET=arm64-osx-custom \
6+
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
7+
-G Ninja

gen-osx-arm64-release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
cmake -S . -B build/Release \
3+
-DCMAKE_BUILD_TYPE=Release \
4+
-DCMAKE_VERBOSE_MAKEFILE=ON \
5+
-DVCPKG_TARGET_TRIPLET=arm64-osx-custom \
6+
-DVCPKG_OVERLAY_TRIPLETS=cmake/triplets \
7+
-G Ninja

0 commit comments

Comments
 (0)