-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
44 lines (38 loc) · 1.29 KB
/
CMakeLists.txt
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
# _____________________________________________________________________________
# Copyright (c) 2018-2020 Steven Varga, Toronto,ON Canada
# Author: Varga, Steven <[email protected]>
# _____________________________________________________________________________
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(h5cpp-compiler-dev VERSION 1.10.4.6 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
find_package(LLVM 6.0.0 REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
include(GNUInstallDirs)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
link_directories(${LLVM_LIBRARY_DIRS})
add_executable(h5cpp src/h5cpp.cpp)
target_link_libraries(h5cpp
LLVM
clangFrontend
clangSerialization
clangDriver
clangParse
clangSema
clangAnalysis
clangRewrite
clangRewriteFrontend
clangASTMatchers
clangAST
clangBasic
clangEdit
clangLex
clangTooling
)
set(INSTALL_DIR_BIN "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
set(INSTALL_DIR_MAN "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}/man1")
message(${INSTALL_DIR_MAN})
install(TARGETS h5cpp DESTINATION ${INSTALL_DIR_BIN})
install(FILES h5cpp.1 DESTINATION ${INSTALL_DIR_MAN})