diff options
| author | 2026-04-19 12:54:16 +0100 | |
|---|---|---|
| committer | 2026-04-27 17:26:08 +0100 | |
| commit | 0dc19894f43ae03a7e78dabfb3784695bd0216fd (patch) | |
| tree | ad44bd4f6ce3e01b046905f00bace5352c366d87 /modules/log_json.cpp | |
| parent | Merge branch 'insp4' into master. (diff) | |
Switch the build system to CMake.
Diffstat (limited to 'modules/log_json.cpp')
| -rw-r--r-- | modules/log_json.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/log_json.cpp b/modules/log_json.cpp index 0bbfd2203..998aa016d 100644 --- a/modules/log_json.cpp +++ b/modules/log_json.cpp @@ -16,14 +16,21 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/// $CompilerFlags: require_environment("SYSTEM_YYJSON" "1") find_compiler_flags("yyjson") -DUSE_SYSTEM_YYJSON -/// $LinkerFlags: require_environment("SYSTEM_YYJSON" "1") find_linker_flags("yyjson") +/// BEGIN CMAKE +/// if($ENV{SYSTEM_YYJSON}) +/// pkg_check_modules("yyjson" IMPORTED_TARGET REQUIRED "yyjson") +/// target_compile_definitions(${TARGET} "USE_SYSTEM_YYJSON") +/// target_link_libraries(${TARGET} PRIVATE "PkgConfig::yyjson") +/// else() +/// target_link_libraries(${TARGET} PRIVATE "vendored_yyjson") +/// endif() +/// END CMAKE #ifdef USE_SYSTEM_YYJSON # include <yyjson.h> #else -# include <yyjson/yyjson.c> +# include <yyjson/yyjson.h> #endif #include "inspircd.h" |
