-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (36 loc) · 1.85 KB
/
CMakeLists.txt
File metadata and controls
47 lines (36 loc) · 1.85 KB
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
cmake_minimum_required(VERSION 3.3)
project(cget)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# This will do for now, but we could probably set up some nice parsing
# with git-describe or similar further down the road
set(cget_MAJOR 0)
set(cget_MINOR 0)
set(cget_PATCH 1)
configure_file (
"${PROJECT_SOURCE_DIR}/VERSION.h.in"
"${PROJECT_BINARY_DIR}/VERSION.h"
)
include_directories("${PROJECT_BINARY_DIR}")
# Main library for cget
include_directories(${CMAKE_SOURCE_DIR}/src/)
set(SOURCE_FILES
src/cget.h
src/constants.h
src/inputparser.h src/inputparser.cpp
src/command/commandfactory.h src/command/commandfactory.cpp
src/command/command.h src/command/command.cpp
src/command/install.h src/command/install.cpp
src/command/init.h src/command/init.cpp
src/registry_api/registry.h
src/registry_api/localregistry.h src/registry_api/localregistry.cpp src/dependency_resolution/dr.h src/dependency_resolution/dependencystorage.h src/dependency_resolution/packagefile.h src/dependency_resolution/dependencystorage.cpp src/dependency_resolution/packagefolder.h src/dependency_resolution/resolver.h src/dependency_resolution/socketfactory.h src/dependency_resolution/defaultsocketfactory.h src/dependency_resolution/defaultsocketfactory.cpp src/dependency_resolution/resolver.cpp src/network/socket.h src/arch/unix/bsdsocket.h src/arch/unix/bsdsocket.cpp)
add_library(cget-core STATIC ${SOURCE_FILES})
# The main executable will only contain the main.cpp, and will
# statically link to the main library
add_executable(cget main.cpp)
target_link_libraries(cget cget-core)
# External libraries
include_directories(${CMAKE_SOURCE_DIR}/lib/json-develop/src)
# Add test project
add_subdirectory(${CMAKE_SOURCE_DIR}/test)
# Generate installation rules
install(TARGETS cget RUNTIME DESTINATION bin)