-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (35 loc) · 1.24 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
cmake_minimum_required(VERSION 3.10)
# set the project name
project(mere-utils
VERSION 0.0.1.1
DESCRIPTION "A simple helper library"
HOMEPAGE_URL "https://utils.merelabs.io"
LANGUAGES C CXX)
#
cmake_host_system_information(RESULT HOSTNAME QUERY FQDN)
message(STATUS "Preparing build on ${HOSTNAME}")
message(STATUS " System : ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}")
message(STATUS " Processor : ${CMAKE_HOST_SYSTEM_PROCESSOR}")
configure_file(Configure.h.in Configure.h)
# specify the mode
set(CMAKE_BUILD_TYPE Release)
#target_include_directories(mere-utils PUBLIC "${PROJECT_BINARY_DIR}")
# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#set(CMAKE_AUTOMOC ON)
#set(CMAKE_AUTORCC ON)
#set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5 COMPONENTS Core REQUIRED)
file(GLOB SOURCES src/*.cpp)
file(GLOB HEADERS src/*.h)
# Create shared library
add_library(${PROJECT_NAME} SHARED ${SOURCES})
# Install library
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION lib)
## Install headers
install(FILES ${HEADERS} DESTINATION include/mere/utils)
target_link_libraries(${PROJECT_NAME} Qt5::Core)