summaryrefslogtreecommitdiff
path: root/stubs/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2025-10-22 22:14:09 -0400
committerJosh Ferrell <josh@vector35.com>2025-10-30 11:02:58 -0400
commit48cc6561ea898126cb8c1c65d5c4d832a8198c22 (patch)
tree2a63a4180112e64e8d7b6426dfe0b818b487f039 /stubs/CMakeLists.txt
parent75f1a8000f391c5f9eb2c21df74a52237aae2fb6 (diff)
Do not pass long paths for windows stub generation
Diffstat (limited to 'stubs/CMakeLists.txt')
-rw-r--r--stubs/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/stubs/CMakeLists.txt b/stubs/CMakeLists.txt
index d877bcd0..9756f91a 100644
--- a/stubs/CMakeLists.txt
+++ b/stubs/CMakeLists.txt
@@ -5,6 +5,9 @@ find_package(Python3 COMPONENTS Interpreter REQUIRED)
file(REAL_PATH "${PROJECT_SOURCE_DIR}/../" ABSOLUTE_API_PATH)
+# Remove long path prefix because it makes cl.exe very angry
+string(REGEX REPLACE "^//\\?/" "" ABSOLUTE_API_PATH "${ABSOLUTE_API_PATH}")
+
# Generate stubs.cpp with implementations of all the BNAPI functions
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/stubs.cpp