modified: CMakeLists.txt
modified: default.nix deleted: packaging/linux/idef0-editor.desktop modified: src/MainWindow.cpp modified: src/MainWindow.h modified: src/items/DiagramScene.cpp modified: src/items/DiagramScene.h modified: src/main.cpp modified: translations/idef0_en.ts modified: translations/idef0_fr.ts modified: translations/idef0_ru.ts
This commit is contained in:
parent
d025b3c551
commit
086644ae82
11 changed files with 948 additions and 57 deletions
|
|
@ -1,10 +1,10 @@
|
|||
cmake_minimum_required(VERSION 3.21)
|
||||
project(idef0_editor LANGUAGES CXX)
|
||||
project(erlu_idef0_editor LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Svg)
|
||||
|
||||
qt_standard_project_setup()
|
||||
|
||||
|
|
@ -21,19 +21,25 @@ qt_add_library(idef0_core SHARED
|
|||
|
||||
option(BUILD_COLORS_PLUGIN "Build the Colors plugin" ON)
|
||||
|
||||
qt_add_executable(idef0_editor
|
||||
qt_add_executable(erlu_idef0_editor
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
qt_add_resources(erlu_idef0_editor "app_icons"
|
||||
PREFIX "/icons"
|
||||
BASE assets/icons
|
||||
FILES assets/icons/erlu.svg
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
set(MACOS_BUNDLE_ID "com.gregorybednov.idef0-editor")
|
||||
set(MACOS_BUNDLE_NAME "IDEF0 Editor")
|
||||
set(MACOS_BUNDLE_ID "com.gregorybednov.erlu-idef0-editor")
|
||||
set(MACOS_BUNDLE_NAME "erlu IDEF0 editor")
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Info.plist.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Info.plist
|
||||
@ONLY
|
||||
)
|
||||
set_target_properties(idef0_editor PROPERTIES
|
||||
set_target_properties(erlu_idef0_editor PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "${MACOS_BUNDLE_NAME}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "${MACOS_BUNDLE_ID}"
|
||||
|
|
@ -41,13 +47,13 @@ if(APPLE)
|
|||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(idef0_editor PRIVATE $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>)
|
||||
target_compile_definitions(erlu_idef0_editor PRIVATE $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>)
|
||||
|
||||
target_include_directories(idef0_core PRIVATE src)
|
||||
target_include_directories(idef0_editor PRIVATE src)
|
||||
target_include_directories(erlu_idef0_editor PRIVATE src)
|
||||
|
||||
target_link_libraries(idef0_core PRIVATE Qt6::Widgets)
|
||||
target_link_libraries(idef0_editor PRIVATE Qt6::Widgets idef0_core)
|
||||
target_link_libraries(erlu_idef0_editor PRIVATE Qt6::Widgets Qt6::Svg idef0_core)
|
||||
set_target_properties(idef0_core PROPERTIES
|
||||
WINDOWS_EXPORT_ALL_SYMBOLS ON
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
|
|
@ -69,11 +75,11 @@ if(BUILD_COLORS_PLUGIN)
|
|||
)
|
||||
endif()
|
||||
|
||||
set_target_properties(idef0_editor PROPERTIES
|
||||
set_target_properties(erlu_idef0_editor PROPERTIES
|
||||
INSTALL_RPATH "\$ORIGIN/../lib"
|
||||
)
|
||||
|
||||
install(TARGETS idef0_editor
|
||||
install(TARGETS erlu_idef0_editor
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
|
@ -90,8 +96,10 @@ if(BUILD_COLORS_PLUGIN)
|
|||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/linux/idef0-editor.desktop
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/linux/erlu-idef0-editor.desktop
|
||||
DESTINATION share/applications)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/linux/idef0.xml
|
||||
DESTINATION share/mime/packages)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/icons/erlu.svg
|
||||
DESTINATION share/icons/hicolor/scalable/apps)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue