diff --git a/CMakeLists.txt b/CMakeLists.txt index 90a1be3de..ba0bddf63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,11 +26,6 @@ option(BUILD_SHARED_LIBS "" OFF) option(CHATTERINO_LTO "Enable LTO for all targets" OFF) option(CHATTERINO_PLUGINS "Enable EXPERIMENTAL plugin support in Chatterino" OFF) -if(CHATTERINO_PLUGINS) - add_definitions(-DCHATTERINO_HAVE_PLUGINS) - message(STATUS "Building Chatterino with lua plugin support enabled.") -endif() - if(CHATTERINO_LTO) include(CheckIPOSupported) check_ipo_supported(RESULT CHATTERINO_ENABLE_LTO OUTPUT IPO_ERROR) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1ca0f6eca..bf8bf23c0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -593,6 +593,14 @@ list(APPEND SOURCE_FILES ${RES_AUTOGEN_FILES}) add_library(${LIBRARY_PROJECT} OBJECT ${SOURCE_FILES}) +if(CHATTERINO_PLUGINS) + target_compile_definitions(${LIBRARY_PROJECT} + PRIVATE + CHATTERINO_HAVE_PLUGINS + ) + message(STATUS "Building Chatterino with lua plugin support enabled.") +endif() + if (CHATTERINO_GENERATE_COVERAGE) include(CodeCoverage) append_coverage_compiler_flags_to_target(${LIBRARY_PROJECT})