Merge pull request #525 from bruxisma/master
Fix exported symbols under clang-cl (Closes #503)
This commit is contained in:
commit
43ef7e25d9
@ -101,6 +101,10 @@ if (BUILD_SHARED_LIBS)
|
|||||||
${PROJECT_SOURCE_DIR}/src/pugixml.cpp)
|
${PROJECT_SOURCE_DIR}/src/pugixml.cpp)
|
||||||
add_library(pugixml::shared ALIAS pugixml-shared)
|
add_library(pugixml::shared ALIAS pugixml-shared)
|
||||||
list(APPEND libs pugixml-shared)
|
list(APPEND libs pugixml-shared)
|
||||||
|
string(CONCAT pugixml.msvc $<OR:
|
||||||
|
$<STREQUAL:${CMAKE_CXX_COMPILER_FRONTEND_VARIANT},MSVC>,
|
||||||
|
$<CXX_COMPILER_ID:MSVC>
|
||||||
|
>)
|
||||||
|
|
||||||
set_property(TARGET pugixml-shared PROPERTY EXPORT_NAME shared)
|
set_property(TARGET pugixml-shared PROPERTY EXPORT_NAME shared)
|
||||||
target_include_directories(pugixml-shared
|
target_include_directories(pugixml-shared
|
||||||
@ -111,8 +115,7 @@ if (BUILD_SHARED_LIBS)
|
|||||||
${PUGIXML_BUILD_DEFINES}
|
${PUGIXML_BUILD_DEFINES}
|
||||||
${PUGIXML_PUBLIC_DEFINITIONS}
|
${PUGIXML_PUBLIC_DEFINITIONS}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<CXX_COMPILER_ID:MSVC>:PUGIXML_API=__declspec\(dllexport\)>
|
PUGIXML_API=$<IF:${pugixml.msvc},__declspec\(dllexport\),__attribute__\(\(visibility\("default"\)\)\)>
|
||||||
$<IF:$<CXX_COMPILER_ID:MSVC>,,PUGIXML_API=__attribute__\(\(visibility\("default"\)\)\)>
|
|
||||||
)
|
)
|
||||||
target_compile_options(pugixml-shared
|
target_compile_options(pugixml-shared
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user