diff options
| author | bunnei <bunneidev@gmail.com> | 2018-01-18 01:37:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-18 01:37:17 -0500 |
| commit | 4ddfb2e881efe65d217328adf9bdb0944e37dfd8 (patch) | |
| tree | 34521653cd5172d2af45214c3cce1f010842210a /src/input_common | |
| parent | 79887def50585c4815e3f371396d66f66364c989 (diff) | |
| parent | 447c25646ed2ea0cb0b553e4b53a9de267b821fb (diff) | |
Merge pull request #84 from lioncash/cmake
CMakeLists: Derive the source directory grouping from targets themselves
Diffstat (limited to 'src/input_common')
| -rw-r--r-- | src/input_common/CMakeLists.txt | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 92792a7021..1c7db28c03 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -1,25 +1,18 @@ -set(SRCS - analog_from_button.cpp - keyboard.cpp - main.cpp - motion_emu.cpp - ) +add_library(input_common STATIC + analog_from_button.cpp + analog_from_button.h + keyboard.cpp + keyboard.h + main.cpp + main.h + motion_emu.cpp + motion_emu.h -set(HEADERS - analog_from_button.h - keyboard.h - main.h - motion_emu.h - ) + $<$<BOOL:${SDL2_FOUND}>:sdl/sdl.cpp sdl/sdl.h> +) -if(SDL2_FOUND) - set(SRCS ${SRCS} sdl/sdl.cpp) - set(HEADERS ${HEADERS} sdl/sdl.h) -endif() - -create_directory_groups(${SRCS} ${HEADERS}) +create_target_directory_groups(input_common) -add_library(input_common STATIC ${SRCS} ${HEADERS}) target_link_libraries(input_common PUBLIC core PRIVATE common) if(SDL2_FOUND) |
