mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #3264 from lioncash/cmake-target
CMakeLists: Derive the source directory grouping from targets themselves
This commit is contained in:
		
						commit
						4695f12a08
					
				
					 14 changed files with 735 additions and 767 deletions
				
			
		|  | @ -1,25 +1,26 @@ | |||
| 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) | ||||
|     target_sources(input_common | ||||
|         PRIVATE | ||||
|             sdl/sdl.cpp | ||||
|             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) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue