2018-04-04 11:41:50 -04:00
|
|
|
add_executable(dolphin-nogui
|
2018-10-24 15:50:54 +10:00
|
|
|
Platform.cpp
|
2019-05-29 05:04:32 -04:00
|
|
|
Platform.h
|
2018-10-24 15:50:54 +10:00
|
|
|
PlatformHeadless.cpp
|
2018-04-04 11:41:50 -04:00
|
|
|
MainNoGUI.cpp
|
|
|
|
)
|
2016-05-05 19:55:29 -04:00
|
|
|
|
2024-04-18 10:58:08 +00:00
|
|
|
if(X11_FOUND)
|
2018-10-24 15:50:54 +10:00
|
|
|
target_sources(dolphin-nogui PRIVATE PlatformX11.cpp)
|
2024-04-18 10:58:08 +00:00
|
|
|
target_link_libraries(dolphin-nogui PRIVATE PkgConfig::XRANDR PkgConfig::X11)
|
2018-10-24 15:50:54 +10:00
|
|
|
endif()
|
|
|
|
|
2019-11-26 15:25:19 +11:00
|
|
|
if(WIN32)
|
|
|
|
target_sources(dolphin-nogui PRIVATE PlatformWin32.cpp)
|
|
|
|
endif()
|
|
|
|
|
2023-02-01 18:00:12 -06:00
|
|
|
if(APPLE)
|
|
|
|
target_sources(dolphin-nogui PRIVATE PlatformMacos.mm)
|
|
|
|
target_compile_options(dolphin-nogui PRIVATE -fobjc-arc)
|
|
|
|
endif()
|
|
|
|
|
2019-04-10 14:44:21 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
target_sources(dolphin-nogui PRIVATE PlatformFBDev.cpp)
|
|
|
|
endif()
|
|
|
|
|
2017-03-08 11:42:46 -08:00
|
|
|
set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui)
|
2016-05-05 19:55:29 -04:00
|
|
|
|
2018-04-04 11:41:50 -04:00
|
|
|
target_link_libraries(dolphin-nogui
|
|
|
|
PRIVATE
|
2016-05-05 19:55:29 -04:00
|
|
|
core
|
|
|
|
uicommon
|
|
|
|
cpp-optparse
|
|
|
|
)
|
|
|
|
|
2023-02-01 18:00:12 -06:00
|
|
|
if(APPLE)
|
|
|
|
target_link_libraries(dolphin-nogui
|
|
|
|
PRIVATE
|
|
|
|
${APPKIT_LIBRARY}
|
|
|
|
${COREFOUNDATION_LIBRARY}
|
|
|
|
${IOK_LIBRARY}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2024-05-04 05:17:45 +02:00
|
|
|
if(WIN32)
|
|
|
|
# needed for adjusting window decorations with DwmSetWindowAttribute
|
|
|
|
target_link_libraries(dolphin-nogui PRIVATE dwmapi.lib)
|
|
|
|
endif()
|
|
|
|
|
2022-05-22 01:19:44 +02:00
|
|
|
if(MSVC)
|
|
|
|
# Add precompiled header
|
|
|
|
target_link_libraries(dolphin-nogui PRIVATE use_pch)
|
|
|
|
endif()
|
|
|
|
|
2018-06-08 15:56:11 -05:00
|
|
|
if(USE_DISCORD_PRESENCE)
|
|
|
|
target_compile_definitions(dolphin-nogui PRIVATE -DUSE_DISCORD_PRESENCE)
|
|
|
|
endif()
|
|
|
|
|
2016-05-05 19:55:29 -04:00
|
|
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui)
|
2022-10-11 13:44:04 -05:00
|
|
|
install(TARGETS dolphin-nogui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2016-05-05 19:55:29 -04:00
|
|
|
|