diff options
author | bunnei <bunneidev@gmail.com> | 2017-03-17 14:59:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 14:59:39 -0400 |
commit | 423ab5e2bcf5a522e5f412447c05f648df57a14c (patch) | |
tree | 1e60eaeffa59229254a47f885d2fe2cbbdc1a5c0 /src/input_common/CMakeLists.txt | |
parent | 3e7459bbf9efa80b2d2dd45b892f7f3cef8ab751 (diff) | |
parent | b5faa681206e2d82248293591f010f7aea8b99fe (diff) |
Merge pull request #2497 from wwylele/input-2
Refactor input emulation & add SDL gamepad support
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 @@ +set(SRCS + analog_from_button.cpp + keyboard.cpp + main.cpp + ) + +set(HEADERS + analog_from_button.h + keyboard.h + main.h + ) + +if(SDL2_FOUND) + set(SRCS ${SRCS} sdl/sdl.cpp) + set(HEADERS ${HEADERS} sdl/sdl.h) + include_directories(${SDL2_INCLUDE_DIR}) +endif() + +create_directory_groups(${SRCS} ${HEADERS}) + +add_library(input_common STATIC ${SRCS} ${HEADERS}) +target_link_libraries(input_common common core) + +if(SDL2_FOUND) + target_link_libraries(input_common ${SDL2_LIBRARY}) + set_property(TARGET input_common APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) +endif() |