diff options
Diffstat (limited to 'src/input_common/CMakeLists.txt')
| -rw-r--r-- | src/input_common/CMakeLists.txt | 27 |
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 @@ | |||
| 1 | set(SRCS | ||
| 2 | analog_from_button.cpp | ||
| 3 | keyboard.cpp | ||
| 4 | main.cpp | ||
| 5 | ) | ||
| 6 | |||
| 7 | set(HEADERS | ||
| 8 | analog_from_button.h | ||
| 9 | keyboard.h | ||
| 10 | main.h | ||
| 11 | ) | ||
| 12 | |||
| 13 | if(SDL2_FOUND) | ||
| 14 | set(SRCS ${SRCS} sdl/sdl.cpp) | ||
| 15 | set(HEADERS ${HEADERS} sdl/sdl.h) | ||
| 16 | include_directories(${SDL2_INCLUDE_DIR}) | ||
| 17 | endif() | ||
| 18 | |||
| 19 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 20 | |||
| 21 | add_library(input_common STATIC ${SRCS} ${HEADERS}) | ||
| 22 | target_link_libraries(input_common common core) | ||
| 23 | |||
| 24 | if(SDL2_FOUND) | ||
| 25 | target_link_libraries(input_common ${SDL2_LIBRARY}) | ||
| 26 | set_property(TARGET input_common APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) | ||
| 27 | endif() | ||