mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Use target_compile_definitions for -DCHATTERINO_HAVE_PLUGINS
This commit is contained in:
parent
1040fbc5e4
commit
df9c269d6d
2 changed files with 8 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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})
|
||||
|
|
Loading…
Reference in a new issue