-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (36 loc) · 1.61 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
55
56
57
58
# Specify the minimum version for CMake
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
cmake_policy(VERSION 3.2)
# The version number.
set(EGXPhys_VERSION "0.1.1")
# Project's name
project(EGXPhys)
# Set the output folders
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
#Build options static/dynamic and unit tests
option(EGXPHYS_STATIC_LIBRARY_ENABLE "EGXPhys static library" OFF)
if(EGXPHYS_STATIC_LIBRARY_ENABLE)
message(STATUS "EGXPhys is a header only library. Set EGXPHYS_STATIC_LIBRARY_ENABLE with ON to build an optional static library.")
endif()
option(EGXPHYS_DYNAMIC_LIBRARY_ENABLE "EGXPHYS dynamic library" OFF)
if(EGXPHYS_DYNAMIC_LIBRARY_ENABLE)
message(STATUS "EGXPhys is a header only library. Set EGXPHYS_DYNAMIC_LIBRARY_ENABLE ON to build an optional dynamic library.")
endif()
option(EGXPHYS_TEST_ENABLE "EGXPHYS test" OFF)
if(NOT EGXPHYS_TEST_ENABLE)
message(STATUS "EGXPhys is a header only library. Set EGXPHYS_TEST_ENABLE ON to build and run the unit tests.")
endif()
#Compiler Options
option(EGXPHYS_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
option(EGXPHYS_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
option(EGXPHYS_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF)
option(EGXPHYS_TEST_ENABLE_CXX_17 "Enable C++ 17" OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#C++ build enviroment options
# The following folder will be included
include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/tests/3rd Party")
# add the executable
add_executable(EGXPhys ${PROJECT_SOURCE_DIR}/tests/unitTest.cpp)