-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
47 lines (34 loc) · 1.25 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
project(ethrpc)
if(ENABLE_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
add_definitions(-D__DEBUG__)
else()
set(CMAKE_BUILD_TYPE Release)
endif()
#cmake_minimum_required(VERSION 3.2)
set (Eth_Connector_VERSION_MAJOR 1)
set (Eth_Connector_VERSION_MINOR 0)
set (Eth_Connector_VERSION_PATCH 0)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/OSFlags.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/deps.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lib.cmake)
if(ENABLE_EXAMPLES)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/examples.cmake)
endif()
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/src/Config.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/ethrpc/Config.hpp"
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
MESSAGE(Status Linux OS detected)
set(PKGCONFIG_DIR lib/pkgconfig)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
MESSAGE(Status FreeBSD OS detected)
set(PKGCONFIG_DIR libdata/pkgconfig)
endif()
if(NOT SKIP_LIBRARY_INSTALL AND DEFINED PKGCONFIG_DIR)
MESSAGE("PKG CONFIG FOUND")
CONFIGURE_FILE("cmake/pkg-config.cmake" "ethrpc.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ethrpc.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${PKGCONFIG_DIR}")
endif()