diff --git a/CMakeLists.txt b/CMakeLists.txt index ad2441b7..0d5fa3fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,22 +49,16 @@ if(APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET ${MACOSX_DEPLOYMENT_TARGET}) endif() -# Set the target system on Windows (for cross-compiling x86) +# target system on Windows (for cross-compiling x86) and static linking runtimes if(WIN32) - if("${PLATFORM}" STREQUAL "x86") + if("$ENV{Platform}" STREQUAL "x86") set(CMAKE_SYSTEM_PROCESSOR "x86") - set(CMAKE_SYSTEM_HOST_PROCESSOR "x86") - # static linking for vcpkg set(VCPKG_TARGET_TRIPLET "x86-windows-static") elseif(NOT "$ENV{PROCESSOR_ARCHITEW6432}" STREQUAL "") set(CMAKE_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") - set(CMAKE_SYSTEM_HOST_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}") - # static linking for vcpkg set(VCPKG_TARGET_TRIPLET "x86-windows-static") else() set(CMAKE_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}") - set(CMAKE_SYSTEM_HOST_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}") - # static linking for vcpkg set(VCPKG_TARGET_TRIPLET "x64-windows-static") endif() # Avoid loading of project_optinos/WindowsToolchain diff --git a/package.json b/package.json index f7c0eebf..319cd590 100644 --- a/package.json +++ b/package.json @@ -113,12 +113,6 @@ "bump": "pnpx npm-check-updates -u -x typescript,eslint,chai && pnpx typesync && pnpm update" }, "cmake-ts": { - "globalCMakeOptions": [ - { - "name": "CMAKE_EXPORT_COMPILE_COMMANDS", - "value": "1" - } - ], "nodeAPI": "node-addon-api", "configurations": [ {