diff options
author | asynts <asynts@gmail.com> | 2021-01-23 23:29:11 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-25 09:47:36 +0100 |
commit | 1a3a0836c017ab5e5672472033f3ff369dc33c39 (patch) | |
tree | 354552e5dae4f7baf2b8ee05eb33e2f7587826f6 /Meta/Lagom/CMakeLists.txt | |
parent | 76f29184162e35d570034a8438a683695faa273f (diff) | |
download | serenity-1a3a0836c017ab5e5672472033f3ff369dc33c39.zip |
Everywhere: Use CMake to generate AK/Debug.h.
This was done with the help of several scripts, I dump them here to
easily find them later:
awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in
for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in)
do
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \;
done
# Remember to remove WRAPPER_GERNERATOR_DEBUG from the list.
awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
Diffstat (limited to 'Meta/Lagom/CMakeLists.txt')
-rw-r--r-- | Meta/Lagom/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index c98f73456f..5a1d1059e7 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -77,9 +77,15 @@ set(LAGOM_REGEX_SOURCES ${LIBREGEX_LIBC_SOURCES} ${LIBREGEX_SOURCES}) set(LAGOM_CORE_SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES}) set(LAGOM_MORE_SOURCES ${LIBELF_SOURCES} ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBX86_SOURCES} ${LIBCRYPTO_SOURCES} ${LIBCOMPRESS_SOURCES} ${LIBCRYPTO_SUBDIR_SOURCES} ${LIBTLS_SOURCES} ${LIBTTF_SOURCES} ${LIBMARKDOWN_SOURCES} ${LIBGEMINI_SOURCES} ${LIBGFX_SOURCES} ${LIBGUI_GML_SOURCES} ${LIBHTTP_SOURCES} ${LAGOM_REGEX_SOURCES} ${SHELL_SOURCES}) -include_directories (../../) -include_directories (../../Userland/) -include_directories (../../Userland/Libraries/) +# FIXME: This is a hack, because the lagom stuff can be build individually or +# in combination with the system, we generate two Debug.h files. One in +# Build/AK/Debug.h and the other in Build/Meta/Lagom/AK/Debug.h. +configure_file(../../AK/Debug.h.in AK/Debug.h @ONLY) + +include_directories(../../) +include_directories(../../Userland/) +include_directories(../../Userland/Libraries/) +include_directories(${CMAKE_BINARY_DIR}) add_library(LagomCore ${LAGOM_CORE_SOURCES}) if (BUILD_LAGOM) |