summaryrefslogtreecommitdiff
path: root/louloulibs/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs/CMakeLists.txt')
-rw-r--r--louloulibs/CMakeLists.txt129
1 files changed, 0 insertions, 129 deletions
diff --git a/louloulibs/CMakeLists.txt b/louloulibs/CMakeLists.txt
deleted file mode 100644
index b3056f2..0000000
--- a/louloulibs/CMakeLists.txt
+++ /dev/null
@@ -1,129 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-
-set(${PROJECT_NAME}_VERSION_MAJOR 1)
-set(${PROJECT_NAME}_VERSION_MINOR 0)
-set(${PROJECT_NAME}_VERSION_SUFFIX "~dev")
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra")
-
-#
-## Look for external libraries
-#
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
-find_package(ICONV REQUIRED)
-find_package(LIBUUID REQUIRED)
-find_package(EXPAT REQUIRED)
-set(EXPAT_FOUND ${EXPAT_FOUND} PARENT_SCOPE)
-
-if(WITH_LIBIDN)
- find_package(LIBIDN REQUIRED)
-elseif(NOT WITHOUT_LIBIDN)
- find_package(LIBIDN)
-endif()
-
-if(WITH_SYSTEMD)
- find_package(SYSTEMD REQUIRED)
-elseif(NOT WITHOUT_SYSTEMD)
- find_package(SYSTEMD)
-endif()
-
-if(WITH_BOTAN)
- find_package(BOTAN REQUIRED)
-elseif(NOT WITHOUT_BOTAN)
- find_package(BOTAN)
-endif()
-
-if(NOT BOTAN_FOUND)
- find_package(GCRYPT REQUIRED)
-endif()
-
-if(WITH_UDNS)
- find_package(UDNS REQUIRED)
-elseif(NOT WITHOUT_UDNS)
- find_package(UDNS)
-endif()
-
-# To be able to include the config.h file generated by cmake
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-include_directories(${EXPAT_INCLUDE_DIRS})
-include_directories(${ICONV_INCLUDE_DIRS})
-include_directories(${LIBUUID_INCLUDE_DIRS})
-
-set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)")
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING})
-else()
- set(POLLER "POLL" CACHE STRING ${POLLER_DOCSTRING})
-endif()
-if((NOT ${POLLER} MATCHES "POLL") AND
- (NOT ${POLLER} MATCHES "EPOLL"))
- message(FATAL_ERROR "POLLER must be either POLL or EPOLL")
-endif()
-
-#
-## utils
-#
-file(GLOB source_utils
- utils/*.[hc]pp)
-set(source_utils ${source_utils} PARENT_SCOPE)
-
-#
-## config
-#
-file(GLOB source_config
- config/*.[hc]pp)
-set(source_config ${source_config} PARENT_SCOPE)
-
-#
-## logger
-#
-file(GLOB source_logger
- logger/*.[hc]pp)
-set(source_logger ${source_logger} PARENT_SCOPE)
-
-#
-## network
-#
-file(GLOB source_network
- network/*.[hc]pp)
-set(source_network ${source_network} PARENT_SCOPE)
-
-#
-## xmpplib
-#
-file(GLOB source_xmpplib
- xmpp/*.[hc]pp)
-set(source_xmpplib ${source_xmpplib} PARENT_SCOPE)
-
-# Define a __FILENAME__ macro with the relative path (from the base project directory)
-# of each source file
-file(GLOB_RECURSE source_all *.[hc]pp)
-foreach(file ${source_all})
- file(RELATIVE_PATH shorter_file ${CMAKE_CURRENT_SOURCE_DIR} ${file})
- set_property(SOURCE ${file} APPEND PROPERTY COMPILE_DEFINITIONS __FILENAME__="${shorter_file}")
-endforeach()
-
-#
-## Check if we have std::get_time
-#
-include(CheckCXXSourceCompiles)
-
-check_cxx_source_compiles("
- #include <iomanip>
- int main()
- { std::get_time(nullptr, \"\"); }"
- HAS_GET_TIME)
-
-mark_as_advanced(HAS_GET_TIME)
-
-check_cxx_source_compiles("
- #include <iomanip>
- int main()
- { std::put_time(nullptr, \"\"); }"
- HAS_PUT_TIME)
-
-mark_as_advanced(HAS_PUT_TIME)
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/louloulibs.h.cmake ${CMAKE_BINARY_DIR}/src/louloulibs.h)