mirror of
https://github.com/citron-neo/emulator.git
synced 2026-07-05 15:21:57 -07:00
Make CPM default to OFF for linux... for now.
Ensure non-CPM builds still work
This commit is contained in:
+1
-10
@@ -94,16 +94,7 @@ CMAKE_DEPENDENT_OPTION(CITRON_CRASH_DUMPS "Compile crash dump (Minidump) support
|
||||
option(CITRON_USE_BUNDLED_VCPKG "Use vcpkg for citron dependencies" "${MSVC}")
|
||||
option(CITRON_USE_CPM "Use CPM.cmake to fetch dependencies" OFF)
|
||||
|
||||
# Auto-enable CPM for Linux/MinGW if not using vcpkg
|
||||
if (NOT CITRON_USE_BUNDLED_VCPKG AND (UNIX OR MINGW))
|
||||
set(CITRON_USE_CPM ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
if (CITRON_USE_CPM)
|
||||
set(CITRON_CHECK_SUBMODULES OFF CACHE BOOL "" FORCE)
|
||||
else()
|
||||
option(CITRON_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||
endif()
|
||||
option(CITRON_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||
|
||||
option(CITRON_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||
|
||||
|
||||
@@ -222,11 +222,20 @@ function(copy_citron_Qt6_deps target_dir)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create a qt.conf next to the executable.
|
||||
file(MAKE_DIRECTORY "${DLL_DEST}")
|
||||
# Create a qt.conf next to the executable at build time.
|
||||
# This handles generator expressions in DLL_DEST (e.g. on MSVC).
|
||||
if (USE_LIB_FOLDER)
|
||||
file(WRITE "${DLL_DEST}qt.conf" "[Paths]\nPlugins = plugins\n")
|
||||
set(_QT_CONF_CONTENTS "[Paths]\nPlugins = plugins\n")
|
||||
else()
|
||||
file(WRITE "${DLL_DEST}qt.conf" "")
|
||||
set(_QT_CONF_CONTENTS "")
|
||||
endif()
|
||||
|
||||
set(_QT_CONF_TEMP "${CMAKE_CURRENT_BINARY_DIR}/qt.conf.${target_dir}.temp")
|
||||
file(WRITE "${_QT_CONF_TEMP}" "${_QT_CONF_CONTENTS}")
|
||||
|
||||
add_custom_command(TARGET ${target_dir} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${DLL_DEST}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_QT_CONF_TEMP}" "${DLL_DEST}qt.conf"
|
||||
COMMENT "Creating qt.conf for ${target_dir}"
|
||||
)
|
||||
endfunction(copy_citron_Qt6_deps)
|
||||
|
||||
@@ -59,12 +59,24 @@ if (WIN32)
|
||||
set(_QT_DIR_NAME "llvm-mingw_64")
|
||||
set(_QT_CMAKE_SUB "lib/cmake/Qt6")
|
||||
else()
|
||||
# Native Linux (or macOS — extend here if needed)
|
||||
set(_QT_OS "linux")
|
||||
set(_QT_TARGET "desktop")
|
||||
set(_QT_ARCH "linux_gcc_64")
|
||||
set(_QT_DIR_NAME "gcc_64")
|
||||
set(_QT_CMAKE_SUB "lib/cmake/Qt6")
|
||||
if (APPLE)
|
||||
set(_QT_OS "mac")
|
||||
set(_QT_TARGET "desktop")
|
||||
if (ARCHITECTURE_arm64)
|
||||
set(_QT_ARCH "mac_arm64")
|
||||
else()
|
||||
set(_QT_ARCH "mac_x64")
|
||||
endif()
|
||||
set(_QT_DIR_NAME "macos")
|
||||
set(_QT_CMAKE_SUB "lib/cmake/Qt6")
|
||||
else()
|
||||
# Native Linux
|
||||
set(_QT_OS "linux")
|
||||
set(_QT_TARGET "desktop")
|
||||
set(_QT_ARCH "linux_gcc_64")
|
||||
set(_QT_DIR_NAME "gcc_64")
|
||||
set(_QT_CMAKE_SUB "lib/cmake/Qt6")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ── Download target Qt ────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user