This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
forked from jwiegley/subconvert
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
68 lines (51 loc) · 1.48 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 2.8)
list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/lib/cmake-cxx11/Modules
)
include(CheckCXX11Features)
add_subdirectory(lib/libgit2)
find_package(Boost COMPONENTS system filesystem REQUIRED)
include_directories(
${CMAKE_CURRENT_LIST_DIR}/src
${CMAKE_CURRENT_LIST_DIR}/lib/libgit2/include
${Boost_INCLUDE_DIRS}
)
# Installation paths
SET(INSTALL_BIN bin CACHE PATH "Where to install binaries to.")
SET(INSTALL_LIB lib CACHE PATH "Where to install libraries to.")
SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -Werror")
set_property(
TARGET git2
APPEND_STRING
PROPERTY COMPILE_FLAGS "-Wno-unused-value -Wno-sizeof-pointer-memaccess"
)
endif()
list(APPEND CMAKE_CXX_FLAGS ${CXX11_FEATURE_LIST})
add_library(gitutil
src/gitutil.cpp)
add_executable(subconvert
src/authors.cpp
src/branches.cpp
src/converter.cpp
src/main.cpp
src/svndump.cpp
src/submodule.cpp
)
add_executable(git-monitor
src/git-monitor.cpp
)
target_link_libraries(gitutil
git2
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
)
target_link_libraries(subconvert gitutil)
target_link_libraries(git-monitor gitutil)
install(
TARGETS subconvert git-monitor gitutil
RUNTIME DESTINATION ${INSTALL_BIN}
LIBRARY DESTINATION ${INSTALL_LIB}
ARCHIVE DESTINATION ${INSTALL_LIB}
)