Warning, /rolisteam/rolisteam/src/libraries/charactersheet/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 project(charactersheet VERSION 1.10.0 DESCRIPTION "Manage charactersheet") 0004 option(CHARACTERSHEET_TESTS "enable tests compilation" OFF) 0005 0006 set(CMAKE_AUTOMOC ON) 0007 set(CMAKE_AUTOUIC ON) 0008 set(CMAKE_AUTORCC ON) 0009 0010 set(QT_REQUIRED_VERSION "6.3.0") 0011 set(QT_VERSION_MAJOR "6") 0012 find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Gui Svg Qml Quick QuickWidgets WebEngineWidgets WebEngineCore) 0013 set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) 0014 0015 include_directories(${CMAKE_CURRENT_SOURCE_DIR} result node) 0016 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) 0017 set(CMAKE_CXX_STANDARD 17) 0018 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0019 0020 set(formula_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/src/formula) 0021 0022 set(formula_src 0023 # formula 0024 ${formula_src_dir}/formulamanager.cpp 0025 ${formula_src_dir}/parsingtoolformula.cpp 0026 ${formula_src_dir}/nodes/formulanode.cpp 0027 ${formula_src_dir}/nodes/operator.cpp 0028 ${formula_src_dir}/nodes/parenthesesfnode.cpp 0029 ${formula_src_dir}/nodes/scalaroperatorfnode.cpp 0030 ${formula_src_dir}/nodes/startnode.cpp 0031 ${formula_src_dir}/nodes/valuefnode.cpp) 0032 0033 set(inc ${CMAKE_CURRENT_SOURCE_DIR}/include/charactersheet_formula) 0034 set(formula_header 0035 # formula 0036 ${inc}/formula_global.h 0037 ${inc}/formulamanager.h 0038 ${inc}/parsingtoolformula.h 0039 ${inc}/nodes/formulanode.h 0040 ${inc}/nodes/operator.h 0041 ${inc}/nodes/parenthesesfnode.h 0042 ${inc}/nodes/scalaroperatorfnode.h 0043 ${inc}/nodes/startnode.h 0044 ${inc}/nodes/valuefnode.h 0045 ) 0046 0047 add_library(charactersheet_formula SHARED ${formula_src} ${formula_header}) 0048 target_link_libraries(charactersheet_formula PUBLIC Qt${QT_VERSION_MAJOR}::Core) 0049 set_target_properties(charactersheet_formula PROPERTIES PUBLIC_HEADER "${formula_header}") 0050 target_compile_definitions(charactersheet_formula PRIVATE CHARACTERSHEET_FORMULA_LIBRARY) 0051 target_include_directories(charactersheet_formula PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/formula 0052 PUBLIC 0053 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 0054 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 0055 #=========================================================== 0056 0057 set(inc_sheet ${CMAKE_CURRENT_SOURCE_DIR}/include/charactersheet) 0058 set(sheet_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/src/charactersheet) 0059 0060 SET(character_sources 0061 ${sheet_src_dir}/charactersheet.cpp 0062 ${sheet_src_dir}/charactersheetitem.cpp 0063 ${sheet_src_dir}/charactersheetmodel.cpp 0064 ${sheet_src_dir}/controllers/fieldcontroller.cpp 0065 ${sheet_src_dir}/controllers/sheetcontroller.cpp 0066 ${sheet_src_dir}/controllers/tablefield.cpp 0067 ${sheet_src_dir}/controllers/section.cpp 0068 ${sheet_src_dir}/controllers/slidercontroller.cpp 0069 ${sheet_src_dir}/csitem.cpp 0070 ${sheet_src_dir}/imagemodel.cpp 0071 ${sheet_src_dir}/rolisteamimageprovider.cpp 0072 ${sheet_src_dir}/worker/ioworker.cpp 0073 ${sheet_src_dir}/fieldfactory.cpp 0074 ) 0075 0076 0077 0078 SET(character_headers 0079 ${inc_sheet}/charactersheet_global.h 0080 ${inc_sheet}/charactersheetitem.h 0081 ${inc_sheet}/charactersheetmodel.h 0082 ${inc_sheet}/controllers/fieldcontroller.h 0083 ${inc_sheet}/controllers/section.h 0084 ${inc_sheet}/controllers/tablefield.h 0085 ${inc_sheet}/controllers/slidercontroller.h 0086 ${inc_sheet}/charactersheet.h 0087 ${inc_sheet}/imagemodel.h 0088 ${inc_sheet}/rolisteamimageprovider.h 0089 ${inc_sheet}/csitem.h 0090 ${inc_sheet}/worker/ioworker.h 0091 ${inc_sheet}/controllers/sheetcontroller.h 0092 ${inc_sheet}/abstractapplicationcontroller.h 0093 ${inc_sheet}/fieldfactory.h 0094 ) 0095 0096 0097 0098 set(qml_sources ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/CheckBoxField.qml 0099 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/CheckBoxFieldv1.qml 0100 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/DiceButton.qml 0101 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/DiceButtonv1.qml 0102 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/ImageField.qml 0103 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/ImageFieldv1.qml 0104 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/example.qml 0105 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/PageButton.qml 0106 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/RLabel.qml 0107 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/SelectField.qml 0108 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/SelectFieldv1.qml 0109 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/Table.qml 0110 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextAreaField.qml 0111 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextAreaFieldv1.qml 0112 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextFieldField.qml 0113 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextFieldFieldv1.qml 0114 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextInputField.qml 0115 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/TextInputFieldv1.qml 0116 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/WebView.qml 0117 ${CMAKE_CURRENT_SOURCE_DIR}/qml/Rolisteam/SliderField.qml 0118 ) 0119 0120 set(documentation Readme.md) 0121 set(charactersheet_QRC ${CMAKE_CURRENT_SOURCE_DIR}/qml/charactersheet.qrc) 0122 0123 0124 0125 #qt_add_qml_module(charactersheet 0126 # URI Rolisteam 0127 # VERSION 1.1 0128 # SOURCES 0129 # ${qml_sources} 0130 #) 0131 #message(${character_sources}) 0132 #message(${character_headers}) 0133 #message(${qml_sources}) 0134 #message(${documentation}) 0135 #message(${charactersheet_QRC}) 0136 0137 add_library(charactersheet SHARED ${character_sources} ${character_headers} ${qml_sources} ${documentation} ${charactersheet_QRC}) 0138 0139 qt_add_qml_module(charactersheet 0140 URI charactersheet 0141 VERSION 1.0 0142 SOURCES 0143 ${sheet_src_dir}/controllers/sheetcontroller.cpp 0144 ${inc_sheet}/controllers/sheetcontroller.h 0145 ${inc_sheet}/abstractapplicationcontroller.h 0146 ) 0147 0148 target_link_libraries(charactersheet PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::QuickWidgets Qt${QT_VERSION_MAJOR}::WebEngineWidgets Qt${QT_VERSION_MAJOR}::WebEngineCore PRIVATE charactersheet_formula utils) 0149 set_target_properties(charactersheet PROPERTIES PUBLIC_HEADER "${character_headers}") 0150 target_compile_definitions(charactersheet PRIVATE CHARACTERSHEET_LIBRARY) 0151 target_include_directories(charactersheet 0152 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src 0153 ${CMAKE_CURRENT_SOURCE_DIR}/src 0154 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/charactersheet> 0155 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/charactersheet/controllers> 0156 PUBLIC 0157 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> 0158 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 0159 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 0160 0161 #=========================================================== 0162 0163 set(inc_sheet ${CMAKE_CURRENT_SOURCE_DIR}/include/charactersheet_widgets) 0164 set(widget_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/src/widget) 0165 0166 set(header_widget ${inc_sheet}/charactersheet_widget_global.h 0167 ${inc_sheet}/sheetwidget.h) 0168 0169 set(src_widget 0170 ${widget_src_dir}/sheetwidget.cpp 0171 ) 0172 0173 0174 0175 add_library(charactersheet_widgets SHARED ${src_widget} ${header_widget} ${charactersheet_QRC}) 0176 target_link_libraries(charactersheet_widgets PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::QuickWidgets Qt${QT_VERSION_MAJOR}::WebEngineWidgets Qt${QT_VERSION_MAJOR}::WebEngineCore PRIVATE charactersheet) 0177 set_target_properties(charactersheet_widgets PROPERTIES PUBLIC_HEADER "${header_widget}") 0178 target_compile_definitions(charactersheet_widgets PRIVATE CHARACTERSHEET_WIDGET_LIBRARY) 0179 target_include_directories(charactersheet_widgets PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src 0180 PUBLIC 0181 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 0182 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 0183 0184 include(install_helper) 0185 rinstallLib(charactersheet_formula libraries) 0186 rinstallLib(charactersheet_widgets libraries) 0187 rinstallLib(charactersheet libraries)