mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +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()
|