File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ if (BUILD_SHARED_LIBS)
101
101
${PROJECT_SOURCE_DIR} /src/pugixml.cpp )
102
102
add_library (pugixml::shared ALIAS pugixml-shared )
103
103
list (APPEND libs pugixml-shared )
104
+ string (CONCAT pugixml.msvc $< OR:
105
+ $< STREQUAL:${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} ,MSVC> ,
106
+ $< CXX_COMPILER_ID:MSVC>
107
+ > )
104
108
105
109
set_property (TARGET pugixml-shared PROPERTY EXPORT_NAME shared )
106
110
target_include_directories (pugixml-shared
@@ -111,8 +115,7 @@ if (BUILD_SHARED_LIBS)
111
115
${PUGIXML_BUILD_DEFINES}
112
116
${PUGIXML_PUBLIC_DEFINITIONS}
113
117
PRIVATE
114
- $< $< CXX_COMPILER_ID:MSVC> :PUGIXML_API=__declspec\(dllexport\)>
115
- $< IF:$< CXX_COMPILER_ID:MSVC> ,,PUGIXML_API=__attribute__\(\(visibility\("default"\)\)\)>
118
+ PUGIXML_API=$<IF:${pugixml.msvc},__declspec\( dllexport\) ,__attribute__\(\( visibility\( "default" \)\)\)>
116
119
)
117
120
target_compile_options (pugixml-shared
118
121
PRIVATE
You can’t perform that action at this time.
0 commit comments