summaryrefslogtreecommitdiff
path: root/src/input_common
diff options
context:
space:
mode:
authorGravatar Lioncash2018-01-17 19:37:34 -0500
committerGravatar Lioncash2018-01-17 21:51:43 -0500
commite710a1b9894d835d740ed63c03098fd637f61f63 (patch)
tree7585a15cdf38ea2913a847c738c84e769e43ea77 /src/input_common
parentMerge pull request #73 from N00byKing/3093 (diff)
downloadyuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.gz
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.xz
yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.zip
CMakeLists: Derive the source directory grouping from targets themselves
Removes the need to store to separate SRC and HEADER variables, and then construct the target in most cases.
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/CMakeLists.txt31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index 92792a702..1c7db28c0 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -1,25 +1,18 @@
1set(SRCS 1add_library(input_common STATIC
2 analog_from_button.cpp 2 analog_from_button.cpp
3 keyboard.cpp 3 analog_from_button.h
4 main.cpp 4 keyboard.cpp
5 motion_emu.cpp 5 keyboard.h
6 ) 6 main.cpp
7 main.h
8 motion_emu.cpp
9 motion_emu.h
7 10
8set(HEADERS 11 $<$<BOOL:${SDL2_FOUND}>:sdl/sdl.cpp sdl/sdl.h>
9 analog_from_button.h 12)
10 keyboard.h
11 main.h
12 motion_emu.h
13 )
14 13
15if(SDL2_FOUND) 14create_target_directory_groups(input_common)
16 set(SRCS ${SRCS} sdl/sdl.cpp)
17 set(HEADERS ${HEADERS} sdl/sdl.h)
18endif()
19
20create_directory_groups(${SRCS} ${HEADERS})
21 15
22add_library(input_common STATIC ${SRCS} ${HEADERS})
23target_link_libraries(input_common PUBLIC core PRIVATE common) 16target_link_libraries(input_common PUBLIC core PRIVATE common)
24 17
25if(SDL2_FOUND) 18if(SDL2_FOUND)