-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (44 loc) · 1.7 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)
project (SymUniverse)
# Basic project definitions
set (SymUniverse_PROJECT_NAME "SymUniverse")
set (SymUniverse_PROJECT_AUTHOR "J. Lowell Wofford")
set (SymUniverse_VERSION_MAJOR 1)
set (SymUniverse_VERSION_MINOR 0)
set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
if( APPLE )
add_definitions( -DAPPLE )
elseif( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
add_definitions( -DLINUX )
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
else( APPLE )
message( FATAL_ERROR "System type ${CMAKE_SYSTEM_NAME} is not
supported!" )
endif( )
# Setup a compiled .h file
configure_file (
"${PROJECT_SOURCE_DIR}/include/SymUniverseConfig.h.in"
"${PROJECT_BINARY_DIR}/include/SymUniverseConfig.h"
)
# Setup includes
include_directories("${PROJECT_BINARY_DIR}/include")
include_directories("${PROJECT_SOURCE_DIR}/include")
file(GLOB_RECURSE INCLUDES "include/*.h" "include/*.h.in")
# Define LIBRARIES varaible, set here because other builds need it.
set(LIBRARIES universe boundaries)
# Add subdirectories
add_subdirectory(src)
add_custom_target(docs ALL SOURCES "LICENSE" "README.md")
# // TODO: Setup install directives
#install(TARGETS sym ubuild umerge ucat uextract udivide DESTINATION bin)
#install(FILES universe.h DESTINATION include)
#install(FILES dummy.mod DESTINATION modules)
#install(FILES "${PROJECT_BINARY_DIR}/SymUniverseConfig.h" DESTINATION include)
# // TODO: Setup installer
# build a CPack driven installer package
#include (InstallRequiredSystemLibraries)
#set (CPACK_RESOURCE_FILE_LICENSE
# "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
#set (CPACK_PACKAGE_VERSION_MAJOR "${SymUniverse_VERSION_MAJOR}")
#set (CPACK_PACKAGE_VERSION_MINOR "${SymUniverse_VERSION_MINOR}")
#include(CPack)