aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/squirrel/fix_optionally_build_sq.patch
blob: 9566ec870e04728595aa09dbe7f9f07770742176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc35b6f..628c649 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ project(squirrel VERSION 3.1 LANGUAGES C CXX)
 
 option(DISABLE_STATIC "Avoid building/installing static libraries.")
 option(LONG_OUTPUT_NAMES "Use longer names for binaries and libraries: squirrel3 (not sq).")
+option(BUILD_SQ "Build sq interpreter.")
 
 if (NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release")
@@ -35,15 +36,24 @@ endif()
 
 add_subdirectory(squirrel)
 add_subdirectory(sqstdlib)
-add_subdirectory(sq)
+
+if(BUILD_SQ)
+  add_subdirectory(sq)
+endif()
 
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   set(tgts)
   if(NOT DISABLE_DYNAMIC)
-    list(APPEND tgts squirrel sqstdlib sq)
+    list(APPEND tgts squirrel sqstdlib)
+    if(BUILD_SQ)
+      list(APPEND tgts sq)
+    endif()
   endif()
   if(NOT DISABLE_STATIC)
-    list(APPEND tgts squirrel_static sqstdlib_static sq_static)
+    list(APPEND tgts squirrel_static sqstdlib_static)
+    if(BUILD_SQ)
+      list(APPEND tgts sq_static)
+    endif()
   endif()
   foreach(t ${tgts})
     target_compile_definitions(${t} PUBLIC -D_SQ64)