aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/CMakeLists.txt
blob: 40736b5d9134d2b4c8b19309f8eeef7a8c19e183 (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
cmake_minimum_required(VERSION 3.16)
project(game_bethesda)

find_package(Qt6 COMPONENTS Widgets REQUIRED)

# Compatibility helpers for upstream plugin CMake files that still call mo2-cmake
# functions. We implement only what this Linux port needs.
function(mo2_configure_plugin target)
  set_target_properties(${target} PROPERTIES
    AUTOMOC ON
    AUTOUIC ON
    AUTORCC ON
    CXX_STANDARD 23
    CXX_STANDARD_REQUIRED ON
    POSITION_INDEPENDENT_CODE ON
  )

  # Keep bare uibase headers after system headers to avoid strings.h collisions.
  target_compile_options(${target} PRIVATE
    "-idirafter" "${CMAKE_SOURCE_DIR}/libs/uibase/include/uibase"
  )
  set_property(TARGET ${target} APPEND PROPERTY AUTOMOC_MOC_OPTIONS
    "-I${CMAKE_SOURCE_DIR}/libs/uibase/include/uibase"
  )
endfunction()

function(mo2_default_source_group)
  # no-op for now
endfunction()

function(mo2_install_plugin target)
  install(TARGETS ${target}
    LIBRARY DESTINATION plugins
  )
endfunction()

add_subdirectory(src/gamebryo)
add_subdirectory(src/creation)

# Build all ported game plugins.
add_subdirectory(src/games/skyrimse)
add_subdirectory(src/games/skyrim)
add_subdirectory(src/games/skyrimvr)
add_subdirectory(src/games/fallout4)
add_subdirectory(src/games/fallout4vr)
add_subdirectory(src/games/fallout3)
add_subdirectory(src/games/falloutnv)
add_subdirectory(src/games/fallout76)
add_subdirectory(src/games/oblivion)
add_subdirectory(src/games/morrowind)
add_subdirectory(src/games/nehrim)
add_subdirectory(src/games/enderal)
add_subdirectory(src/games/enderalse)
add_subdirectory(src/games/starfield)
add_subdirectory(src/games/ttw)
add_subdirectory(src/games/fallout4london)