summaryrefslogtreecommitdiff
path: root/src/input_common/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/CMakeLists.txt')
-rw-r--r--src/input_common/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
new file mode 100644
index 000000000..cfe5caaa3
--- /dev/null
+++ b/src/input_common/CMakeLists.txt
@@ -0,0 +1,27 @@
1set(SRCS
2 analog_from_button.cpp
3 keyboard.cpp
4 main.cpp
5 )
6
7set(HEADERS
8 analog_from_button.h
9 keyboard.h
10 main.h
11 )
12
13if(SDL2_FOUND)
14 set(SRCS ${SRCS} sdl/sdl.cpp)
15 set(HEADERS ${HEADERS} sdl/sdl.h)
16 include_directories(${SDL2_INCLUDE_DIR})
17endif()
18
19create_directory_groups(${SRCS} ${HEADERS})
20
21add_library(input_common STATIC ${SRCS} ${HEADERS})
22target_link_libraries(input_common common core)
23
24if(SDL2_FOUND)
25 target_link_libraries(input_common ${SDL2_LIBRARY})
26 set_property(TARGET input_common APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2)
27endif()