summaryrefslogtreecommitdiff
path: root/math/libfixmath/files/patch-CMakeLists.txt
blob: 0647c6b3251c23e102daccbe0319f4510158bd21 (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
28
--- CMakeLists.txt.orig	2022-09-15 10:24:31 UTC
+++ CMakeLists.txt
@@ -11,17 +11,23 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=return-type")
 
 include(libfixmath/libfixmath.cmake)
+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 fixmath 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 fixmath m)
 target_include_directories(fixsingen PRIVATE ${CMAKE_SOURCE_DIR})