Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 6e3a6708 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

BUILD: Remove some platform specific things to make things compile with the...

BUILD: Remove some platform specific things to make things compile with the windob' toolchain + patch cmake file with modifications from the windows-build-rebase branch
parent 2b7e6200
Branches
Aucune étiquette associée trouvée
1 requête de fusion!197Draft: Refactor the whole code.
......@@ -110,7 +110,7 @@ Windows 64 bit binaries are built from a linux system. On arch, install the pack
`mingw-w64-gcc`, `mingw-w64-cmake` (aur), `mingw-w64-make` (aur). You may also install the
`mingw-w64-qt6-*-static` (aur) packages: `mingw-w64-qt6-base-static`, `mingw-w64-qt6-svg-static`,
`mingw-w64-qt6-tools-static`, `mingw-w64-qt6-multimedia-static`, `mingw-w64-qt6-declarative-static`.
(The MPV package is out of date, we need to do something about it...) Make sure that you have the
The mpv library is `mingw-w64-mpv`, it is out of date but deal with it. Make sure that you have the
windows toolchain for 64 bit installed: `rustup target add x86_64-pc-windows-gnu`. Then run the
followinf command:
......
......@@ -55,9 +55,6 @@ fn main() -> Result<()> {
min_size: Some((900, 600)),
level: iced::window::Level::AlwaysOnTop,
position: iced::window::Position::Centered,
platform_specific: iced::window::PlatformSpecific {
application_id: "Amadeus".into(),
},
..Default::default()
},
flags: config,
......
......@@ -95,12 +95,14 @@ message(STATUS "The installation prefix is ${CMAKE_INSTALL_PREFIX}")
if(WIN32)
message(STATUS "You are building on windows, pay attenion to the dependencies")
set(LKT_OS_WIN 1)
add_compile_definitions(LKT_OS_WIN=1)
find_package(dlfcn-win32 REQUIRED)
add_compile_definitions(LKT_OS_WIN=1 TERMIWIN_DONOTREDEFINE)
endif()
if(MSVC OR MSYS OR MINGW)
message(STATUS "You are building with a windows compiler")
set(LKT_OS_MINGW 1)
add_compile_definitions(LKT_OS_MINGW=1)
find_package(dlfcn-win32 REQUIRED)
add_compile_definitions(LKT_OS_MINGW=1 TERMIWIN_DONOTREDEFINE)
endif()
if(APPLE)
message(STATUS "You are building on MacOS X")
......@@ -126,6 +128,7 @@ qt_add_library(lektor_c_static STATIC common.cc mainwindow.cc module_qt_window.c
foreach(target lektor_c lektor_c_static)
set_property(TARGET ${target} PROPERTY CXX_STANDARD 20)
target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(${target} PRIVATE
LKT_ARCH="${CMAKE_SYSTEM_PROCESSOR}"
......@@ -144,6 +147,7 @@ foreach(target lektor_c lektor_c_static)
${${CMAKE_BUILD_TYPE}_${CMAKE_C_COMPILER_ID}_C_FLAGS}
${${CMAKE_BUILD_TYPE}_${CMAKE_CXX_COMPILER_ID}_C_FLAGS}
)
target_link_options(${target} PRIVATE -Wl,-rpath,. -rdynamic)
target_link_libraries(${target}
PRIVATE
......@@ -153,5 +157,8 @@ foreach(target lektor_c lektor_c_static)
Qt::OpenGL
Qt::OpenGLWidgets
)
if(WIN32)
target_link_libraries(${TARGET} PRIVATE regex dlfcn-win32::dl ws2_32)
endif()
endforeach()
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter