mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 21:42:49 +00:00
7b81903756
Modules didn't correctly define their dependencies before, which relied on the frontends implicitly including every module for linking to succeed. Also changed every target_link_libraries call to specify visibility of dependencies to avoid leaking definitions to dependents when not necessary.
28 lines
659 B
CMake
28 lines
659 B
CMake
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 PUBLIC core PRIVATE common)
|
|
|
|
if(SDL2_FOUND)
|
|
target_link_libraries(input_common PRIVATE ${SDL2_LIBRARY})
|
|
target_compile_definitions(input_common PRIVATE HAVE_SDL2)
|
|
endif()
|