-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (29 loc) · 969 Bytes
/
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
# Build instruction
# $ cmake -H. -Bbuild
# $ make -C build
# $ ./build/bin/niyebe
cmake_minimum_required(VERSION 3.10)
# Project name and version
project(Niyebe VERSION 1.0.0)
set (${PROJECT_NAME}_VERSION_MAJOR 1)
set (${PROJECT_NAME}_VERSION_MINOR 0)
set (${PROJECT_NAME}_VERSION_PATCH "0a")
configure_file(include/NiyebeConfig.h.in ../include/NiyebeConfig.h)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Directories
include_directories(include)
# Executable
add_executable(niyebe
src/main.cpp
include/NiyebeConfig.h)
# Install
# cmake --build build --config Release --target install
if(UNIX)
message("Platform: ${CMAKE_SYSTEM_NAME}")
install(PROGRAMS "${CMAKE_BINARY_DIR}/bin/niyebe"
DESTINATION "~/Documents/Niyebe")
elseif(WIN32)
message("Platform: ${CMAKE_SYSTEM_NAME}")
install(PROGRAMS "${CMAKE_BINARY_DIR}/bin/niyebe"
DESTINATION "{CMAKE_INSTALL_PREFIX}")
endif()