forked from matachi/Artemis-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (43 loc) · 2 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
51
52
53
54
cmake_minimum_required(VERSION 2.6)
message("====================================")
message("Building Makefile for Artemis-Cpp")
message("====================================")
message("Source Dir: ${CMAKE_CURRENT_SOURCE_DIR}")
message("Binary Dir: ${CMAKE_CURRENT_BINARY_DIR}")
# =================================================================
# Project properties
# =================================================================
project(ArtemisCpp)
# Specify build output directories
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Prevents cmake from following symbolic links using GLOB
cmake_policy( SET CMP0009 NEW)
# =================================================================
# Source Files (.cpp files)
# =================================================================
file(GLOB_RECURSE SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
# =================================================================
# Include directories (containing .h files)
# =================================================================
set(INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include")
file(GLOB_RECURSE HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
# =================================================================
# Output Library
# =================================================================
include_directories(${INCLUDE_DIRECTORIES})
message("Directories included in the Header search:")
foreach(dir ${INCLUDE_DIRECTORIES})
message(" ${dir}")
endforeach(dir)
add_library(ArtemisCpp STATIC ${SOURCE_FILES})
# =================================================================
# Install Target
# =================================================================
INSTALL(FILES ${HEADER_FILES}
DESTINATION include/Artemis)
INSTALL(TARGETS ArtemisCpp
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)