blob: 10706206f3b5ecc09b3ea63a0236a7e639988c15 (
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
|
cmake_minimum_required(VERSION 3.0.2)
project(sibs)
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES
external/xxhash.c
backend/ninja/Ninja.cpp
backend/BackendUtils.cpp
src/main.cpp
src/FileUtil.cpp
src/Conf.cpp
src/PkgConfig.cpp
src/Exec.cpp
src/GlobalLib.cpp
src/curl.cpp
src/Archive.cpp
src/CmakeModule.cpp
src/Package.cpp
src/GitRepository.cpp
src/Platform.cpp
depends/libninja/src/Ninja.cpp)
find_package(CURL REQUIRED)
if(APPLE)
set(LibArchive_LIBRARIES "/usr/local/opt/libarchive/lib/libarchive.dylib")
set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include")
else()
find_package(LibArchive REQUIRED)
endif()
add_executable(sibs ${SOURCE_FILES})
include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} "depends/libninja/include")
if(WIN32)
target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} "${CMAKE_CURRENT_SOURCE_DIR}/msvc/git2.lib")
target_compile_options(sibs PRIVATE /Wall)
else()
target_link_libraries(sibs ${CURL_LIBRARIES} ${LibArchive_LIBRARIES} -lgit2)
target_compile_options(sibs PRIVATE -Wall -Wextra -Werror=return-type -fdiagnostics-show-option -fexceptions)
endif()
|