blob: e5003639e50bb5ca8b637f0375ad8ddf3c5cddc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#=============================================================================
# Copyright Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
# Tell executables in the build tree where to find the source tree.
configure_file(
"SourceDir.txt.in"
"${CastXML_BINARY_DIR}/CMakeFiles/castxmlSourceDir.txt" @ONLY
)
# Tell executables in the build tree where to find Clang resources.
configure_file(
"ClangResourceDir.txt.in"
"${CastXML_BINARY_DIR}/CMakeFiles/castxmlClangResourceDir.txt" @ONLY
)
# Configure version number for C++ code.
configure_file(
"Version.h.in"
"${CastXML_BINARY_DIR}/src/Version.h" @ONLY
)
set(clang_libs
clangFrontend
clangDriver
clangSerialization
clangParse
clangSema
clangAnalysis
clangEdit
clangAST
clangLex
clangBasic
)
llvm_map_components_to_libraries(llvm_libs native option bitreader)
add_executable(castxml
castxml.cxx
Detect.cxx Detect.h
Options.h
Output.cxx Output.h
RunClang.cxx RunClang.h
Utils.cxx Utils.h
)
target_link_libraries(castxml
cxsys
${clang_libs}
${llvm_libs}
)
set_property(SOURCE Utils.cxx APPEND PROPERTY COMPILE_DEFINITIONS
"CASTXML_INSTALL_DATA_DIR=\"${CastXML_INSTALL_DATA_DIR}\"")
install(TARGETS castxml DESTINATION ${CastXML_INSTALL_RUNTIME_DIR})
|