mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* every 3rd party lib is now excluded from "all" build, meaning it gets only build when actually used. removed the cmake option to partially build, due to the above changes this is no more needed, just build the target streamlined 3rdparty target names, they all start with lib now * renamed escriptgrammar target to escriptgrammar_codegen for clarification fixed dependency name * corrected sources name * readded missing include
44 lines
1.1 KiB
CMake
44 lines
1.1 KiB
CMake
set(grammardir ${POL_EXT_LIB_DIR}/Parser)
|
|
|
|
set(libescriptgrammar_sources
|
|
${grammardir}/EscriptGrammar/EscriptLexer.cpp
|
|
${grammardir}/EscriptGrammar/EscriptLexer.h
|
|
${grammardir}/EscriptGrammar/EscriptParser.cpp
|
|
${grammardir}/EscriptGrammar/EscriptParser.h
|
|
${grammardir}/EscriptGrammar/EscriptParserBaseListener.cpp
|
|
${grammardir}/EscriptGrammar/EscriptParserBaseListener.h
|
|
${grammardir}/EscriptGrammar/EscriptParserListener.cpp
|
|
${grammardir}/EscriptGrammar/EscriptParserListener.h
|
|
)
|
|
|
|
set(lib_name libescriptgrammar)
|
|
|
|
add_library(${lib_name} STATIC
|
|
EXCLUDE_FROM_ALL
|
|
${${lib_name}_sources}
|
|
)
|
|
set_compile_flags(${lib_name} 0)
|
|
|
|
target_include_directories(${lib_name} PRIVATE
|
|
"${grammardir}/EscriptGrammar"
|
|
)
|
|
target_link_libraries(${lib_name} PUBLIC
|
|
libantlr
|
|
)
|
|
|
|
warning_suppression(${lib_name})
|
|
|
|
target_compile_options(${lib_name} PRIVATE
|
|
$<${windows}:
|
|
/wd4100 #unreferenced formal parameter
|
|
>
|
|
$<${linux}:
|
|
-Wno-unused-parameter
|
|
-Wno-attributes
|
|
>
|
|
)
|
|
|
|
set_target_properties (${lib_name} PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES ${grammardir}
|
|
FOLDER 3rdParty
|
|
)
|