odyssey/CMakeLists.txt

27 lines
767 B
CMake
Raw Normal View History

2017-01-11 14:25:05 +00:00
cmake_minimum_required(VERSION 2.8)
2017-06-07 11:37:42 +00:00
project(shapito)
2017-01-11 14:25:05 +00:00
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Debug")
endif()
2017-01-11 14:25:05 +00:00
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
2017-02-10 10:49:21 +00:00
set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra -fPIC -g -O2")
2017-01-11 14:25:05 +00:00
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
2017-02-10 10:49:21 +00:00
set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra -fPIC -g -O0")
2017-01-11 14:25:05 +00:00
endif()
2017-01-17 14:17:04 +00:00
include_directories("${PROJECT_SOURCE_DIR}/src")
include_directories("${PROJECT_BINARY_DIR}/src")
2017-01-11 14:25:05 +00:00
2017-01-13 09:35:40 +00:00
option(BUILD_STATIC "Enable Static" OFF)
2017-01-17 14:17:04 +00:00
add_subdirectory(src)
2017-01-11 14:25:05 +00:00
message (STATUS "")
2017-06-07 11:37:42 +00:00
message (STATUS "SHAPITO: PostgreSQL protocol interaction library.")
2017-01-11 14:25:05 +00:00
message (STATUS "")
message (STATUS "BUILD_STATIC: ${BUILD_STATIC}")
message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
2017-01-13 09:35:40 +00:00
message (STATUS "")