aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/CMakeLists.txt
diff options
context:
space:
mode:
authorSteveice10 <1269164+Steveice10@users.noreply.github.com>2024-01-24 01:27:25 -0800
committerGitHub <noreply@github.com>2024-01-24 10:27:25 +0100
commit4b576d066e4b0513eacaba5c62018d1a850bbce1 (patch)
treed363d6273181b13cb05ed265fb8ada33e197f8b9 /src/frontend/qt_sdl/CMakeLists.txt
parent77274735d62b2fe34ee2ad0fc2eb0c37197f3f19 (diff)
Add support for using a portable directory without special build flags. (#1956)
Diffstat (limited to 'src/frontend/qt_sdl/CMakeLists.txt')
-rw-r--r--src/frontend/qt_sdl/CMakeLists.txt12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index 8eeb44a..1dec174 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -166,11 +166,13 @@ target_link_libraries(melonDS PRIVATE ${QT_LINK_LIBS} ${CMAKE_DL_LIBS})
target_include_directories(melonDS PRIVATE "${Slirp_INCLUDE_DIRS}")
target_link_libraries(melonDS PRIVATE "${Slirp_LINK_LIBRARIES}")
-if (UNIX)
- option(PORTABLE "Make a portable build that looks for its configuration in the current directory" OFF)
-elseif (WIN32)
+if (WIN32)
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
+ if (PORTABLE)
+ target_compile_definitions(melonDS PRIVATE WIN32_PORTABLE)
+ endif()
+
configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_BINARY_DIR}/res/melon.rc")
target_sources(melonDS PUBLIC "${CMAKE_BINARY_DIR}/res/melon.rc")
target_include_directories(melonDS PRIVATE "${CMAKE_BINARY_DIR}/res")
@@ -189,10 +191,6 @@ elseif (WIN32)
set_target_properties(melonDS PROPERTIES LINK_FLAGS_DEBUG "-mconsole")
endif()
-if (PORTABLE)
- target_compile_definitions(melonDS PRIVATE PORTABLE)
-endif()
-
if (APPLE)
target_sources(melonDS PRIVATE sem_timedwait.cpp)