mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-06 08:39:06 +00:00
build system updates and other fixes
add preset config import qt separate core and frontend
This commit is contained in:
@@ -1,3 +1,54 @@
|
||||
target_sources(threeSD PRIVATE
|
||||
frontend/main.cpp
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
if (POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
endif()
|
||||
|
||||
add_executable(threeSD
|
||||
main.cpp
|
||||
main.h
|
||||
main.ui
|
||||
)
|
||||
|
||||
target_link_libraries(threeSD PRIVATE common core)
|
||||
target_link_libraries(threeSD PRIVATE Qt5::Widgets)
|
||||
target_link_libraries(threeSD PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||
|
||||
if (APPLE)
|
||||
# TODO: support macOS
|
||||
# set(MACOSX_ICON "../../dist/citra.icns")
|
||||
# set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
# target_sources(threeSD PRIVATE ${MACOSX_ICON})
|
||||
# set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE TRUE)
|
||||
# set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||
elseif(WIN32)
|
||||
# compile as a win32 gui application instead of a console application
|
||||
target_link_libraries(threeSD PRIVATE Qt5::WinMain)
|
||||
if(MSVC)
|
||||
set_target_properties(threeSD PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
|
||||
elseif(MINGW)
|
||||
set_target_properties(threeSD PROPERTIES LINK_FLAGS_RELEASE "-mwindows")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(threeSD PRIVATE
|
||||
# Use QStringBuilder for string concatenation to reduce
|
||||
# the overall number of temporary strings created.
|
||||
-DQT_USE_QSTRINGBUILDER
|
||||
|
||||
# Disable implicit type narrowing in signal/slot connect() calls.
|
||||
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
|
||||
|
||||
# Disable unsafe overloads of QProcess' start() function.
|
||||
-DQT_NO_PROCESS_COMBINED_ARGUMENT_START
|
||||
|
||||
# Disable implicit QString->QUrl conversions to enforce use of proper resolving functions.
|
||||
-DQT_NO_URL_CAST_FROM_STRING
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
include(CopyQt5Deps)
|
||||
copy_Qt5_deps(threeSD)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user