Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 92 | macro(link_to_llvm name llvm_libs) | |||
---|---|---|---|---|---|
111 | foreach(user_lib ${USER_LIBS}) | 111 | foreach(user_lib ${USER_LIBS}) | ||
112 | target_link_libraries(${name} ${user_lib}) | 112 | target_link_libraries(${name} ${user_lib}) | ||
113 | endforeach() | 113 | endforeach() | ||
114 | 114 | | |||
115 | foreach(llvm_system_lib ${LLVM_SYSTEM_LIBS}) | 115 | foreach(llvm_system_lib ${LLVM_SYSTEM_LIBS}) | ||
116 | target_link_libraries(${name} ${llvm_system_lib}) | 116 | target_link_libraries(${name} ${llvm_system_lib}) | ||
117 | endforeach() | 117 | endforeach() | ||
118 | 118 | | |||
119 | if(MSVC) | 119 | if(WIN32) | ||
smartins: this will break mingw, no ? | |||||
It's done to fix mingw build :) Without this library mingw does not link because of the missing symbols. ivandonchevskii: It's done to fix mingw build :) Without this library mingw does not link because of the missing… | |||||
120 | target_link_libraries(${name} version.lib) | 120 | target_link_libraries(${name} version.lib) | ||
121 | endif() | 121 | endif() | ||
122 | endmacro() | 122 | endmacro() | ||
123 | 123 | | |||
124 | option(CLAZY_STATIC_PLUGIN_LIB "Build plugin into static library" OFF) | ||||
125 | set(PLUGIN_LINK_TYPE SHARED) | ||||
126 | | ||||
127 | if (CLAZY_STATIC_PLUGIN_LIB) | ||||
128 | set(PLUGIN_LINK_TYPE STATIC) | ||||
129 | endif() | ||||
130 | | ||||
124 | macro(add_clang_plugin name) | 131 | macro(add_clang_plugin name) | ||
125 | set(srcs ${ARGN}) | 132 | set(srcs ${ARGN}) | ||
126 | 133 | | |||
127 | add_library(${name} SHARED ${srcs}) | 134 | add_library(${name} ${PLUGIN_LINK_TYPE} ${srcs}) | ||
128 | 135 | | |||
129 | if(SYMBOL_FILE) | 136 | if(SYMBOL_FILE) | ||
130 | set_target_properties(${name} PROPERTIES LINK_FlAGS "-exported_symbols_list ${SYMBOL_FILE}") | 137 | set_target_properties(${name} PROPERTIES LINK_FlAGS "-exported_symbols_list ${SYMBOL_FILE}") | ||
131 | endif() | 138 | endif() | ||
132 | 139 | | |||
133 | link_to_llvm(${name} "${LLVM_LIBS_LIST}") | 140 | link_to_llvm(${name} "${LLVM_LIBS_LIST}") | ||
134 | 141 | | |||
135 | if(MSVC) | 142 | if(MSVC) | ||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |
this will break mingw, no ?