Skip to content

Commit

Permalink
Cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
ElTh0r0 committed Apr 9, 2024
1 parent afdb9aa commit 952d7b8
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 37 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (QT6)
set(QT_MINIMUM_VERSION 6.0)
else()
set(QT_MAIN_VERSION Qt5)
set(QT_MINIMUM_VERSION 5.9)
set(QT_MINIMUM_VERSION 5.11)
if(NOT COMMAND qt_add_translation)
function(qt_add_translation _qm_files)
qt5_add_translation("${_qm_files}" ${ARGN})
Expand All @@ -43,6 +43,8 @@ endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(LINUX ON)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(WINDOWS ON)
endif()

if (NOT BUILD_COMMUNITY_ONLY)
Expand Down
18 changes: 12 additions & 6 deletions application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

add_executable(inyokaedit)
if(WINDOWS)
set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/data/win.rc")
qt_add_executable(inyokaedit ${app_icon_resource_windows})
set_target_properties(inyokaedit PROPERTIES
OUTPUT_NAME InyokaEdit
WIN32_EXECUTABLE TRUE
)
else()
qt_add_executable(inyokaedit)
endif()

target_compile_features(inyokaedit PUBLIC cxx_std_17)
target_compile_definitions(inyokaedit
Expand All @@ -32,12 +41,9 @@ target_compile_definitions(inyokaedit
APP_COPY="${PROJECT_COPYRIGHT}"
APP_DESC="${PROJECT_DESCRIPTION}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(inyokaedit
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(inyokaedit
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
24 changes: 24 additions & 0 deletions application/data/win.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
IDI_ICON1 ICON DISCARDABLE "../icons/inyokaedit.ico"

1 VERSIONINFO
FILEVERSION 0,28,1,0
PRODUCTVERSION 0,28,1,0
{
BLOCK "StringFileInfo"
{
BLOCK "000004B0"
{
VALUE "CompanyName", "org.inyokaproject.inyokaedit\0"
VALUE "FileDescription", "Editor for Inyoka based portals\0"
VALUE "LegalCopyright", "(c) 2011-present The InyokaEdit developers\0"
VALUE "OriginalFilename", "InyokaEdit.exe\0"
VALUE "ProductName", "InyokaEdit\0"
VALUE "ProductVersion", "0.28.1.0\0"
VALUE "FileVersion", "0.28.1.0\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0000, 0x04B0
}
}
7 changes: 2 additions & 5 deletions plugins/highlighter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ target_compile_definitions(highlighter
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(highlighter
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(highlighter
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
7 changes: 2 additions & 5 deletions plugins/hotkey/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ target_compile_definitions(hotkey
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(hotkey
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(hotkey
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
7 changes: 2 additions & 5 deletions plugins/spellchecker-hunspell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ target_compile_definitions(spellchecker-hunspell
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(spellchecker-hunspell
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(spellchecker-hunspell
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
7 changes: 2 additions & 5 deletions plugins/spellchecker-nuspell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ target_compile_definitions(spellchecker-nuspell
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(spellchecker-nuspell
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(spellchecker-nuspell
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
7 changes: 2 additions & 5 deletions plugins/uu_knowledgebox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ target_compile_definitions(uu_knowledgebox
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(uu_knowledgebox
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(uu_knowledgebox
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down
7 changes: 2 additions & 5 deletions plugins/uu_tabletemplate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ target_compile_definitions(uu_tabletemplate
PLUGIN_VERSION="${PROJECT_VERSION}"
PLUGIN_COPY="${PROJECT_COPYRIGHT}"
QT_NO_FOREACH
$<$<CONFIG:DEBUG>:QT_DISABLE_DEPRECATED_BEFORE=0x060600>
)
target_compile_options(uu_tabletemplate
PRIVATE
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060600>
-fno-sized-deallocation
)

target_link_libraries(uu_tabletemplate
PRIVATE
${QT_MAIN_VERSION}::Core
Expand Down

0 comments on commit 952d7b8

Please sign in to comment.