-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
45 lines (33 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
##########################################################################################
# CMake build script for task 2 of Machine Graphics course.
# Copyright Moscow State University, Graphics and Media Lab.
##########################################################################################
PROJECT(Task2 CXX C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "No build type selected, default is Debug")
SET(CMAKE_BUILD_TYPE "Debug")
ENDIF()
IF(NOT DEFINED CMAKE_CURRENT_LIST_DIR)
SET(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_SOURCE_DIR})
ENDIF(NOT DEFINED CMAKE_CURRENT_LIST_DIR)
MESSAGE(STATUS "CMAKE_CURRENT_LIST_DIR: ${CMAKE_CURRENT_LIST_DIR}")
MESSAGE(STATUS "PROJECT_BINARY_DIR : ${PROJECT_BINARY_DIR}")
SET(Source_Path ${CMAKE_CURRENT_LIST_DIR})
MESSAGE(STATUS "Source_Path : ${Source_Path}")
SET(CMAKE_DEBUG_POSTFIX "_d")
MESSAGE(STATUS "CMAKE_DEBUG_POSTFIX : ${CMAKE_DEBUG_POSTFIX}")
IF(UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wno-unused-result")
ENDIF(UNIX)
##########################################################################################
# Adding executable of project
INCLUDE(${Source_Path}/cmake/main.cmake)
INCLUDE(${Source_Path}/cmake/argvparser.cmake)
INCLUDE(${Source_Path}/cmake/EasyBMP.cmake)
INCLUDE(${Source_Path}/cmake/liblinear.cmake)
ADD_EXECUTABLE(task2 ${MAIN} ${ARGVPARSER} ${EASY_BMP} ${LIBLINEAR})
##########################################################################################
# Adding executable of test program
INCLUDE(${Source_Path}/cmake/test.cmake)
ADD_EXECUTABLE(task2_test ${TEST} ${ARGVPARSER})