diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2024-05-21 01:29:20 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2024-05-21 01:29:20 +0200 |
commit | b54b8f5b25403cf3b9623804b2491ec78a8b913e (patch) | |
tree | 8100b69a2fd1e37d1eb400a33c92ec3c984f208b /src/blogc-make/CMakeLists.txt | |
parent | 0bbc18869720ad042b668742ca48e5cb8a37491a (diff) | |
download | blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.tar.gz blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.tar.bz2 blogc-b54b8f5b25403cf3b9623804b2491ec78a8b913e.zip |
build: replace autotools with cmake
this patch removes all the autoconf/automake/libtool build
infrastructure and replaces it with cmake.
notable default behavior changes:
- man pages are not pre-built, and are not built by default, must be
enabled with `-DBUILD_MANPAGES=ON`.
removed features:
- srpm packaging, to be reintroduced at some point.
- deb packaging, now handled externally via rafaelmartins/deb.rgm.io
more stuff must be missing, please report bugs!
Diffstat (limited to 'src/blogc-make/CMakeLists.txt')
-rw-r--r-- | src/blogc-make/CMakeLists.txt | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/blogc-make/CMakeLists.txt b/src/blogc-make/CMakeLists.txt new file mode 100644 index 0000000..778db37 --- /dev/null +++ b/src/blogc-make/CMakeLists.txt @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2024 Rafael G. Martins <rafael@rafaelmartins.eng.br> +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT DEFINED HAVE_DIRENT_H OR + NOT DEFINED HAVE_FCNTL_H OR + NOT DEFINED HAVE_LIBGEN_H OR + NOT DEFINED HAVE_SYS_STAT_H OR + NOT DEFINED HAVE_SYS_WAIT_H OR + NOT DEFINED HAVE_TIME_H OR + NOT DEFINED HAVE_UNISTD_H) + message(FATAL_ERROR "Missing header dependencies for blogc-make") +endif() + +add_library(libblogc_make STATIC + atom.c + atom.h + ctx.c + ctx.h + exec.c + exec.h + exec-native.c + exec-native.h + httpd.c + httpd.h + reloader.c + reloader.h + rules.c + rules.h + settings.c + settings.h + utils.c + utils.h +) + +target_link_libraries(libblogc_make PRIVATE + libblogc_common + m +) + +if(NOT BUILD_BLOGC_MAKE_EMBEDDED) + add_executable(blogc-make + main.c + ) + + target_link_libraries(blogc-make PRIVATE + libblogc_make + ) + + install(TARGETS blogc-make) +endif() |