fix(build): duplicate osl lexing symbols when building as static libraries (#1709)

Like other oslcomp source files that are duplicated in oslexec, this
duplication should only be done for shared library builds where the
symbols are hidden from each other.

Signed-off-by: Brecht Van Lommel <brecht@blender.org>
This commit is contained in:
Brecht Van Lommel
2023-08-11 00:06:25 -07:00
committed by GitHub
parent 8dae508b4f
commit 06c42d5c18
+3 -1
View File
@@ -148,7 +148,9 @@ file (GLOB exec_headers "*.h")
file (GLOB compiler_headers "../liboslcomp/*.h")
FLEX_BISON ( osolex.l osogram.y oso lib_src exec_headers )
FLEX_BISON ( ../liboslcomp/osllex.l ../liboslcomp/oslgram.y osl lib_src compiler_headers )
if (BUILD_SHARED_LIBS)
FLEX_BISON ( ../liboslcomp/osllex.l ../liboslcomp/oslgram.y osl lib_src compiler_headers )
endif()
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" )