blob: 912828713cfc0d8e6489efc26e29bdc964e91181 (
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
42
43
44
45
46
47
|
set(XINPUT, "xinput") sets the variable "XINPUT," to "xinput",
so this variable is never used anyways
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a443b66..61ff7b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,11 +9,11 @@ option(GAINPUT_TESTS "Build Tests for Gainput" ON)
option(GAINPUT_BUILD_SHARED "BUILD_SHARED" ON)
option(GAINPUT_BUILD_STATIC "BUILD_STATIC" ON)
-if(!WIN32)
+if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
else()
set(XINPUT "Xinput9_1_0")
- if ( ${CMAKE_SYSTEM_VERSION} LESS 6.1 )
+ if ( 0 )
set(XINPUT, "xinput")
endif()
endif()
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index cb7232f..a6ae3d9 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,15 +55,21 @@ elseif(APPLE)
find_library(FOUNDATION Foundation)
find_library(IOKIT IOKit)
find_library(GAME_CONTROLLER GameController)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${FOUNDATION} ${IOKIT} ${GAME_CONTROLLER})
+ endif()
if(IOS)
find_library(UIKIT UIKit)
find_library(COREMOTION CoreMotion)
find_library(QUARTZCORE QuartzCore)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${UIKIT} ${COREMOTION})
+ endif()
else()
find_library(APPKIT AppKit)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${APPKIT})
+ endif()
endif()
endif()
|