2020-05-03 20:21:13 +03:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(serenity)
|
2020-08-06 05:57:38 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2020-05-03 20:21:13 +03:00
|
|
|
|
2020-12-29 06:38:52 +03:00
|
|
|
set(SERENITY_ARCH "i686" CACHE STRING "Target architecture for SerenityOS.")
|
|
|
|
|
2020-05-03 20:21:13 +03:00
|
|
|
file(GLOB_RECURSE AK_SOURCES "serenity/AK/*.cpp")
|
2021-01-14 02:30:29 +03:00
|
|
|
file(GLOB_RECURSE APPLICATIONS_SOURCES "serenity/Userland/Applications/*.cpp")
|
2020-05-03 20:21:13 +03:00
|
|
|
file(GLOB_RECURSE BASE_SOURCES "serenity/Base/*.cpp")
|
2021-01-14 02:30:29 +03:00
|
|
|
file(GLOB_RECURSE DEMOS_SOURCES "serenity/Userland/Demos/*.cpp")
|
|
|
|
file(GLOB_RECURSE DEVTOOLS_SOURCES "serenity/Userland/DevTools/*.cpp")
|
|
|
|
file(GLOB_RECURSE GAMES_SOURCES "serenity/Userland/Games/*.cpp")
|
2020-05-03 20:21:13 +03:00
|
|
|
file(GLOB_RECURSE KERNEL_SOURCES "serenity/Kernel/*.cpp")
|
2021-01-14 02:30:29 +03:00
|
|
|
file(GLOB_RECURSE LIBRARIES_SOURCES "serenity/Userland/Libraries/*.cpp")
|
|
|
|
file(GLOB_RECURSE MENU_APPLETS_SOURCES "serenity/Userland/MenuApplets/*.cpp")
|
2020-05-03 20:21:13 +03:00
|
|
|
file(GLOB_RECURSE PORTS_SOURCES "serenity/Ports/*.cpp")
|
2021-01-14 02:30:29 +03:00
|
|
|
file(GLOB_RECURSE SERVICES_SOURCES "serenity/Userland/Services/*.cpp")
|
2021-01-12 13:53:14 +03:00
|
|
|
file(GLOB_RECURSE SHELL_SOURCES "serenity/Userland/Shell/*.cpp")
|
2021-01-14 02:30:29 +03:00
|
|
|
file(GLOB_RECURSE TESTS_SOURCES "serenity/Userland/Tests/*.cpp")
|
2020-05-03 20:21:13 +03:00
|
|
|
file(GLOB_RECURSE TOOLCHAIN_SOURCES "serenity/Toolchain/*.cpp")
|
|
|
|
file(GLOB_RECURSE USERLAND_SOURCES "serenity/Userland/*.cpp")
|
|
|
|
|
|
|
|
set(INCLUDE_DIRS
|
|
|
|
"serenity"
|
|
|
|
"serenity/Kernel"
|
2021-01-14 02:30:29 +03:00
|
|
|
"serenity/Userland/Libraries"
|
|
|
|
"serenity/Userland/Libraries/LibC"
|
|
|
|
"serenity/Userland/Libraries/LibPthread"
|
|
|
|
"serenity/Userland/Libraries/LibM"
|
|
|
|
"serenity/Userland/Services"
|
2020-12-29 06:38:52 +03:00
|
|
|
"serenity/Toolchain/Local/${SERENITY_ARCH}/${SERENITY_ARCH}-pc-serenity/include/c++/10.2.0"
|
2020-08-06 05:57:38 +03:00
|
|
|
"serenity/Build/Services"
|
|
|
|
"serenity/Build/Libraries")
|
2020-05-03 20:21:13 +03:00
|
|
|
|
|
|
|
add_library(serenity
|
|
|
|
${AK_SOURCES}
|
|
|
|
${APPLICATIONS_SOURCES}
|
|
|
|
${BASE_SOURCES}
|
|
|
|
${DEMOS_SOURCES}
|
|
|
|
${DEVTOOLS_SOURCES}
|
|
|
|
${GAMES_SOURCES}
|
|
|
|
${KERNEL_SOURCES}
|
|
|
|
${LIBRARIES_SOURCES}
|
|
|
|
${MENU_APPLETS_SOURCES}
|
|
|
|
${PORTS_SOURCES}
|
2021-01-14 02:30:29 +03:00
|
|
|
${SERVICES_SOURCES}
|
2020-05-03 20:21:13 +03:00
|
|
|
${SHELL_SOURCES}
|
|
|
|
${TESTS_SOURCES}
|
|
|
|
${TOOLCHAIN_SOURCES}
|
|
|
|
${USERLAND_SOURCES})
|
|
|
|
|
|
|
|
target_compile_definitions(serenity PRIVATE __serenity__ USERLAND SANITIZE_PTRS DEBUG)
|
|
|
|
target_include_directories(serenity PRIVATE ${INCLUDE_DIRS})
|