From 1e96b266a195338cb1721aa76313cce6a1b96950 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 22 Apr 2017 17:55:59 +0200 Subject: Initial Commit. --- CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..662815f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.0 FATAL_ERROR) + +project("JabberHive - Command Line Interface") + +include(FindPkgConfig) + +add_subdirectory(src) +add_definitions(-D_POSIX_SOURCE) +add_definitions(-D_POSIX_C_SOURCE=200809L) + +if(CMAKE_COMPILER_IS_GNUCC) + message(STATUS "GNUCC detected. Adding '-O3' parameter.") + set(CMAKE_C_FLAGS "-O3") + #set(CMAKE_C_FLAGS " -g") +endif() + +# ${SRC_FILES} is recursively defined in the subdirectories. +# Each subdirectory only adds the source files that are present at its level. +add_executable(jabberhive-cli ${SRC_FILES}) +set_property(TARGET jabberhive-cli PROPERTY C_STANDARD 99) +set_property(TARGET jabberhive-cli PROPERTY C_STANDARD_REQUIRED ON) + +## OPTION HANDLING ############################################################# +# TODO -- cgit v1.2.3-70-g09d2