Skip to content

Commit d8059de

Browse files
committed
build: attempt to fix osx build by building to the same osx version as libextism
1 parent 0a6d6f7 commit d8059de

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CMakeLists.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
cmake_minimum_required(VERSION 3.18)
22
include_guard(GLOBAL)
33
set (CMAKE_CXX_STANDARD 17)
4+
if(APPLE)
5+
# cmake likes to build to the major version.
6+
# rust likes to build to the minor version (to build libextism)
7+
# attempt to set cmake to build to the minor version
8+
execute_process(
9+
COMMAND sw_vers -productVersion
10+
OUTPUT_VARIABLE MACOS_VERSION
11+
OUTPUT_STRIP_TRAILING_WHITESPACE
12+
)
13+
set(CMAKE_OSX_DEPLOYMENT_TARGET ${MACOS_VERSION} CACHE STRING "Minimum OS X deployment version")
14+
endif()
415

516
# extism-cpp library
617
project(extism-cpp VERSION 1.0.0 DESCRIPTION "C++ bindings for libextism")

0 commit comments

Comments
 (0)