CMake: Define an interface target for SDL2 definitions
This commit is contained in:
parent
34b6c8bd88
commit
776cb91785
4 changed files with 11 additions and 8 deletions
|
@ -15,15 +15,13 @@ set(HEADERS
|
|||
|
||||
create_directory_groups(${SRCS} ${HEADERS})
|
||||
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
|
||||
add_executable(citra ${SRCS} ${HEADERS})
|
||||
target_link_libraries(citra PRIVATE common core input_common)
|
||||
target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} inih glad)
|
||||
target_link_libraries(citra PRIVATE inih glad)
|
||||
if (MSVC)
|
||||
target_link_libraries(citra PRIVATE getopt)
|
||||
endif()
|
||||
target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue