aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/CMakeLists.txt
blob: 84fec1a2ec92247483cf469acdce5488683c0741 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
add_qtc_plugin(Lua
  PLUGIN_DEPENDS Core
  PUBLIC_DEPENDS lua546 sol2 TextEditor ProjectExplorer
  PUBLIC_DEFINES LUA_AVAILABLE
  SOURCES
    bindings/action.cpp
    bindings/async.h
    bindings/core.cpp
    bindings/fetch.cpp
    bindings/gui.cpp
    bindings/hook.cpp
    bindings/inheritance.h
    bindings/install.cpp
    bindings/json.cpp
    bindings/localsocket.cpp
    bindings/macro.cpp
    bindings/menu.cpp
    bindings/messagemanager.cpp
    bindings/project.cpp
    bindings/qt.cpp
    bindings/qtcprocess.cpp
    bindings/settings.cpp
    bindings/taskhub.cpp
    bindings/texteditor.cpp
    bindings/translate.cpp
    bindings/utils.cpp
    bindings/utils.h
    luaengine.cpp
    luaengine.h
    luaexpander.cpp
    luaplugin.cpp
    luapluginspec.cpp
    luapluginspec.h
    luaqttypes.cpp
    luaqttypes.h
    luatr.h
    wizards/wizards.qrc
    # generateqtbindings.cpp # Use this if you need to generate some code.
  SBOM_ARGS
    USE_ATTRIBUTION_FILES
    CREATE_SBOM_FOR_EACH_ATTRIBUTION
    ATTRIBUTION_FILE_PATHS
      "${QtCreator_SOURCE_DIR}/qt_attributions.json"
    ATTRIBUTION_IDS
      sol2
      ms-jpq-lua-async-await
      kikito/inspect.lua
)

if(TARGET Lua)

    qt_add_resources(Lua lua_images_rcc
      PREFIX "/lua"
      FILES
        images/settingscategory_lua.png
        images/settingscategory_lua@2x.png
    )

    qt_add_resources(Lua lua_script_rcc
      PREFIX "/lua"
      FILES
        scripts/async.lua
        scripts/ilua.lua
        scripts/inspect.lua
    )

    set_source_files_properties(luauibindings.cpp PROPERTY SKIP_AUTOMOC ON PROPERTY SKIP_AUTOGEN ON)

    if (MSVC)
        # Prevent fatal error C1128
        target_compile_options(Lua PRIVATE /bigobj)
    endif()
    if (MINGW)
        target_compile_options(Lua PRIVATE "-Wa,-mbig-obj")
    endif()

    qtc_copy_to_builddir(copy_lua_meta_files
      DIRECTORIES meta
      DESTINATION ${IDE_DATA_PATH}/lua/meta
    )
endif()