summaryrefslogtreecommitdiff
path: root/math/libfixmath/files/patch-CMakeLists.txt
blob: 1639b21ab4b623578726ef71c787baefe17629f9 (plain) (blame)
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
--- CMakeLists.txt.orig	2023-08-08 06:08:53 UTC
+++ CMakeLists.txt
@@ -14,16 +14,22 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
 
 if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
     # We're in the root, define additional targets for developers.
+    if (BUILD_TESTING)
     include(tests/tests.cmake)
+    endif()
 
     file(GLOB fixsingen-srcs fixsingen/*.c)
+    if (BUILD_TESTING)
     file(GLOB fixtest-srcs fixtest/*.c fixtest/*.h)
+    endif()
 
+    if (BUILD_TESTING)
     add_executable(fixtest ${fixtest-srcs})
-    target_link_libraries(fixtest PRIVATE libfixmath m)
+    target_link_libraries(fixtest PRIVATE m)
     target_include_directories(fixtest PRIVATE ${CMAKE_SOURCE_DIR})
+    endif()
 
     add_executable(fixsingen ${fixsingen-srcs})
-    target_link_libraries(fixsingen PRIVATE libfixmath m)
+    target_link_libraries(fixsingen PRIVATE m)
     target_include_directories(fixsingen PRIVATE ${CMAKE_SOURCE_DIR})
 endif()