Warning, /rolisteam/rolisteam-diceparser/src/bin/mobile/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 option(UPDATE_TRANSLATIONS "update Translation" OFF) 0004 MESSAGE(STATUS "UPDATE TRANSLATIONS: ${UPDATE_TRANSLATIONS}") 0005 0006 0007 project(diceGui) 0008 0009 0010 # Find includes in corresponding build directories 0011 set(CMAKE_INCLUDE_CURRENT_DIR ON) 0012 # Instruct CMake to run moc automatically when needed. 0013 set(CMAKE_AUTOMOC ON) 0014 0015 # Find the QtWidgets library 0016 find_package(Qt6 COMPONENTS Quick Qml Core Widgets Gui) 0017 #find_package(Qt6QuickCompiler) 0018 0019 set(EXECUTABLE_OUTPUT_PATH bin/) 0020 0021 include_directories(${Qt5Core_INCLUDES} ${Qt5Widgets_INCLUDES} ${Qt5Gui_INCLUDES} ${Qt5Qml_INCLUDES} ${Qt5Quick_INCLUDES}../) 0022 add_definitions(${Qt5Core_DEFINITIONS} ${Qt5Qml_DEFINITIONS} ${Qt5Quick_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5Gui_DEFINITIONS} ) 0023 0024 ADD_DEFINITIONS( 0025 -std=c++11 0026 ) 0027 0028 set(diceGui_RESOURCES diceparser.qrc) 0029 FIND_PACKAGE(Qt6LinguistTools) 0030 0031 0032 IF(UPDATE_TRANSLATIONS) 0033 MESSAGE( update Translation ) 0034 FILE(GLOB_RECURSE translate_diceGui_SRCS ../*.cpp ../*.h) 0035 SET(translate_SRCS ${translate_dice_SRCS}) 0036 SET(diceGui_TS "${CMAKE_CURRENT_SOURCE_DIR}/i18n/diceGui_en.ts" "${CMAKE_CURRENT_SOURCE_DIR}/i18n/diceGui_fr.ts") 0037 ELSE() 0038 MESSAGE( NO updates for translations) 0039 FILE(GLOB diceGui_TS "${CMAKE_CURRENT_SOURCE_DIR}/i18n/*.ts") 0040 ENDIF(UPDATE_TRANSLATIONS) 0041 0042 if(Qt5Core_FOUND) 0043 0044 IF(UPDATE_TRANSLATIONS) 0045 MESSAGE(status "find" ${diceGui_TS} ${translate_SRCS} ) 0046 QT5_CREATE_TRANSLATION(diceGui_QM ${translate_SRCS} ${diceGui_TS}) 0047 ELSE() 0048 QT5_ADD_TRANSLATION(diceGui_QM ${diceGui_TS}) 0049 ENDIF() 0050 0051 QT5_ADD_RESOURCES(diceGui_RESOURCES_RCC ${diceGui_RESOURCES}) 0052 0053 # guess plugins and libraries directory 0054 set(QT_PLUGINS_DIR "${Qt5Core_DIR}/../../../plugins") 0055 get_target_property(QT_LIBRARY_DIR Qt6::Core LOCATION) 0056 get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH) 0057 endif() 0058 0059 SET( diceGui_sources 0060 ../diceparser.cpp 0061 ../range.cpp 0062 ../booleancondition.cpp 0063 ../validator.cpp 0064 ../compositevalidator.cpp 0065 ../operationcondition.cpp 0066 ../die.cpp 0067 ../parsingtoolbox.cpp 0068 ../dicealias.cpp 0069 ../result/result.cpp 0070 ../result/scalarresult.cpp 0071 ../result/stringresult.cpp 0072 ../result/diceresult.cpp 0073 ../node/countexecutenode.cpp 0074 ../node/dicerollernode.cpp 0075 ../node/executionnode.cpp 0076 ../node/explodedicenode.cpp 0077 ../node/helpnode.cpp 0078 ../node/mergenode.cpp 0079 ../node/jumpbackwardnode.cpp 0080 ../node/keepdiceexecnode.cpp 0081 ../node/listaliasnode.cpp 0082 ../node/listsetrollnode.cpp 0083 ../node/numbernode.cpp 0084 ../node/parenthesesnode.cpp 0085 ../node/paintnode.cpp 0086 ../node/rerolldicenode.cpp 0087 ../node/scalaroperatornode.cpp 0088 ../node/sortresult.cpp 0089 ../node/startingnode.cpp 0090 ../node/ifnode.cpp 0091 ../node/filternode.cpp 0092 ../node/stringnode.cpp 0093 ../node/splitnode.cpp 0094 ../node/groupnode.cpp 0095 ../node/variablenode.cpp 0096 ../node/bind.cpp 0097 main.cpp 0098 maincontroller.cpp 0099 commandmodel.cpp 0100 ../highlightdice.cpp 0101 ) 0102 qt5_add_resources(RESOURCE_ADDED mobile.qrc) 0103 0104 add_executable( diceGui ${diceGui_sources} ${diceGui_QM} ${RESOURCE_ADDED} ) 0105 0106 target_link_libraries(diceGui ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Qml_LIBRARIES} ${Qt5Quick_LIBRARIES}) 0107 0108 #qt5_use_modules()