| 1 |
add_executable(dolphin-nogui |
| 2 |
Platform.cpp |
| 3 |
Platform.h |
| 4 |
PlatformHeadless.cpp |
| 5 |
MainNoGUI.cpp |
| 6 |
) |
| 7 |
|
| 8 |
if(X11_FOUND) |
| 9 |
target_sources(dolphin-nogui PRIVATE PlatformX11.cpp) |
| 10 |
target_link_libraries(dolphin-nogui PRIVATE PkgConfig::XRANDR PkgConfig::X11) |
| 11 |
endif() |
| 12 |
|
| 13 |
if(WIN32) |
| 14 |
target_sources(dolphin-nogui PRIVATE PlatformWin32.cpp) |
| 15 |
endif() |
| 16 |
|
| 17 |
if(APPLE) |
| 18 |
target_sources(dolphin-nogui PRIVATE PlatformMacos.mm) |
| 19 |
target_compile_options(dolphin-nogui PRIVATE -fobjc-arc) |
| 20 |
endif() |
| 21 |
|
| 22 |
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
| 23 |
target_sources(dolphin-nogui PRIVATE PlatformFBDev.cpp) |
| 24 |
endif() |
| 25 |
|
| 26 |
if (WIN32) |
| 27 |
target_sources(dolphin-nogui PRIVATE DolphinNoGUI.exe.manifest DolphinNoGUI.rc) |
| 28 |
|
| 29 |
set_target_properties(dolphin-nogui PROPERTIES |
| 30 |
DEBUG_POSTFIX D |
| 31 |
OUTPUT_NAME DolphinNoGUI |
| 32 |
) |
| 33 |
else() |
| 34 |
set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui) |
| 35 |
endif() |
| 36 |
|
| 37 |
target_link_libraries(dolphin-nogui |
| 38 |
PRIVATE |
| 39 |
core |
| 40 |
uicommon |
| 41 |
cpp-optparse |
| 42 |
) |
| 43 |
|
| 44 |
if(APPLE) |
| 45 |
target_link_libraries(dolphin-nogui |
| 46 |
PRIVATE |
| 47 |
${APPKIT_LIBRARY} |
| 48 |
${COREFOUNDATION_LIBRARY} |
| 49 |
${IOK_LIBRARY} |
| 50 |
) |
| 51 |
endif() |
| 52 |
|
| 53 |
if(WIN32) |
| 54 |
# needed for adjusting window decorations with DwmSetWindowAttribute |
| 55 |
target_link_libraries(dolphin-nogui PRIVATE dwmapi.lib) |
| 56 |
endif() |
| 57 |
|
| 58 |
if(MSVC) |
| 59 |
# Add precompiled header |
| 60 |
target_link_libraries(dolphin-nogui PRIVATE use_pch) |
| 61 |
endif() |
| 62 |
|
| 63 |
if(USE_DISCORD_PRESENCE) |
| 64 |
target_compile_definitions(dolphin-nogui PRIVATE -DUSE_DISCORD_PRESENCE) |
| 65 |
endif() |
| 66 |
|
| 67 |
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui) |
| 68 |
install(TARGETS dolphin-nogui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
| 69 |
|