Fix CMake projects to link to proper libraries when built as shared library.

This commit is contained in:
Frederich Munch 2016-06-05 19:04:38 -04:00 committed by sftnight
parent ae0c82121d
commit a054b253d8
5 changed files with 28 additions and 13 deletions

View File

@ -54,13 +54,26 @@ add_cling_library(clingInterpreter OBJECT
ValuePrinterSynthesizer.cpp
LINK_LIBS
LLVMSupport
LLVMMC
LLVMObject
LLVMAnalysis
LLVMExecutionEngine
LLVMCodeGen
LLVMRuntimeDyld
LLVMTarget # for Target::Target()
LLVMCore
clangBasic
clangSerialization
clangAST
clangParse
clangCodeGen
clangFrontend
clangDriver
clangParse
clangLex
clangSema
clingUtils
dl
)
add_library(clingInterpreter-interface INTERFACE)

View File

@ -19,13 +19,15 @@ add_cling_library(clingMetaProcessor OBJECT
MetaSema.cpp
LINK_LIBS
LLVMCore
LLVMSupport
clangBasic
clangAST
clangLex
clingInterpreter
LLVMCore
)
add_dependencies(clingMetaProcessor clangBasic LLVMCore)
add_dependencies(clingMetaProcessor clangBasic LLVMSupport)
if ( MSVC )
set_target_properties(clingMetaProcessor PROPERTIES

View File

@ -30,6 +30,11 @@ add_cling_library(clingUserInterface
${TEXTINPUTSRC}textinput/TerminalDisplayWin.cpp
${TEXTINPUTSRC}textinput/TextInput.cpp
${TEXTINPUTSRC}textinput/TextInputContext.cpp
LINK_LIBS
LLVMSupport
clingMetaProcessor
clingInterpreter
)
add_dependencies(clingUserInterface clangBasic)

View File

@ -11,11 +11,14 @@ add_cling_library(clingUtils OBJECT
Validation.cpp
LINK_LIBS
LLVMSupport
clangCodeGen
clangBasic
clangAST
clangSema
)
add_dependencies(clingUtils clangBasic clangCodeGen)
add_dependencies(clingUtils LLVMSupport clangBasic clangCodeGen)
if ( MSVC )
set_target_properties(clingUtils PROPERTIES

View File

@ -16,15 +16,7 @@ set_target_properties(cling
PROPERTIES ENABLE_EXPORTS 1)
target_link_libraries(cling
clangAST
clangBasic
clangCodeGen
clangDriver
clangFrontend
clangLex
clangParse
clangSema
clangSerialization
LLVMSupport
clingUserInterface
clingMetaProcessor