CMakeLists.txt 1.41 KB
Newer Older
1
2
3
4
# Copyright: (C)
# Authors: Timothee Habra
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

Olivier Lantsoght's avatar
Olivier Lantsoght committed
5
cmake_minimum_required(VERSION 3.4)
6
7
8

project(MBsysC_utilities)

9
# Preprocessor definition, in order to suppress the warnings : (ST)
10
# "Avertissement    C4996    'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details."
11
12
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
13
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
14

15
16
17
18
19
20
21
22
23
24
25
26
27

# release of debug
release_debug()

# list source files to compile
init_src()
increment_src( ${PROJECT_SOURCE_DIR} )

# list include directories (to find headers)
init_include()
set(INCLUDE_DIR ${INCLUDE_DIR} ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
set(INCLUDE_DIR ${INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/auto_output PARENT_SCOPE)

Timothee Habra's avatar
Timothee Habra committed
28
29
30
set(LIB_MBSYSC_UTILITIES MBsysC_utilities)
set(LIB_MBSYSC_UTILITIES ${LIB_MBSYSC_UTILITIES} PARENT_SCOPE)

31
if(FLAG_SHARED_LIB)
32
    add_library(${LIB_MBSYSC_UTILITIES} SHARED ${SOURCE_FILES} ${INCLUDE_DIR})
33
else( )
34
    add_library(${LIB_MBSYSC_UTILITIES} STATIC ${SOURCE_FILES} ${INCLUDE_DIR})
35
36
endif( )

37
38
set(LIB_MBSYSC_UTILITIES_PATH ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)

39
40
41
42
# include directories
include_directories("./")
include_directories("./auto_output")
include_directories(../mbs_struct)