From 1ec70337cfbf42f5f10d20c6152cdc5cf635df1b Mon Sep 17 00:00:00 2001 From: jin-eld Date: Sat, 24 Aug 2013 03:36:43 +0300 Subject: Remove cmake build system --- CMakeLists.txt | 67 ------------------- Makefile.am | 12 ++-- auto_tests/CMakeLists.txt | 22 ------ auto_tests/Makefile.inc | 7 +- auto_tests/cmake/crypto_test.cmake | 10 --- auto_tests/cmake/friends_test.cmake | 10 --- auto_tests/cmake/messenger_test.cmake | 10 --- cmake/FindCheck.cmake | 46 ------------- cmake/FindCursesw.cmake | 47 ------------- cmake/FindLIBCONFIG.cmake | 20 ------ cmake/FindNaCl.cmake | 17 ----- cmake/FindSODIUM.cmake | 75 --------------------- cmake/FindSphinx.cmake | 16 ----- cmake/InstallPkgConfigFile.cmake | 78 ---------------------- docs/CMakeLists.txt | 38 ----------- other/CMakeLists.txt | 23 ------- other/Makefile.inc | 4 +- other/bootstrap_serverdaemon/CMakeLists.txt | 19 ------ other/bootstrap_serverdaemon/Makefile.inc | 6 +- .../cmake/Modules/FindLibConfig.cmake | 73 -------------------- other/cmake/DHT_bootstrap.cmake | 10 --- testing/CMakeLists.txt | 15 ----- testing/Makefile.inc | 8 --- testing/cmake/DHT_test.cmake | 10 --- testing/cmake/Lossless_UDP_testclient.cmake | 9 --- testing/cmake/Lossless_UDP_testserver.cmake | 9 --- testing/cmake/Messenger_test.cmake | 9 --- testing/cmake/crypto_speed_test.cmake | 9 --- testing/cmake/nTox.cmake | 12 ---- toxcore/CMakeLists.txt | 45 ------------- toxcore/Makefile.inc | 2 - 31 files changed, 7 insertions(+), 731 deletions(-) delete mode 100755 CMakeLists.txt delete mode 100644 auto_tests/CMakeLists.txt delete mode 100644 auto_tests/cmake/crypto_test.cmake delete mode 100644 auto_tests/cmake/friends_test.cmake delete mode 100644 auto_tests/cmake/messenger_test.cmake delete mode 100644 cmake/FindCheck.cmake delete mode 100644 cmake/FindCursesw.cmake delete mode 100644 cmake/FindLIBCONFIG.cmake delete mode 100644 cmake/FindNaCl.cmake delete mode 100644 cmake/FindSODIUM.cmake delete mode 100644 cmake/FindSphinx.cmake delete mode 100644 cmake/InstallPkgConfigFile.cmake delete mode 100644 docs/CMakeLists.txt delete mode 100644 other/CMakeLists.txt delete mode 100644 other/bootstrap_serverdaemon/CMakeLists.txt delete mode 100644 other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake delete mode 100644 other/cmake/DHT_bootstrap.cmake delete mode 100644 testing/CMakeLists.txt delete mode 100644 testing/cmake/DHT_test.cmake delete mode 100644 testing/cmake/Lossless_UDP_testclient.cmake delete mode 100644 testing/cmake/Lossless_UDP_testserver.cmake delete mode 100644 testing/cmake/Messenger_test.cmake delete mode 100644 testing/cmake/crypto_speed_test.cmake delete mode 100644 testing/cmake/nTox.cmake delete mode 100644 toxcore/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100755 index 73e89171..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) - -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) - -option(SHARED_TOXCORE "Build Core as a shared library") - -if(WIN32) - option(SHARED_LIBSODIUM "Links libsodium as a shared library") -else() - option(USE_NACL "Use NaCl library instead of libsodium") - option(NO_WIDECHAR "Do not use wide char, even if supported") -endif() - -#OS X specific -if(APPLE) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib) - set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/local/include" ) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/opt/local/lib") -endif() - -if(UNIX) - find_package(Cursesw REQUIRED) -endif() - -if(USE_NACL) - find_package(NaCl REQUIRED) - - include_directories(${NACL_INCLUDE_DIR}) - add_definitions(-DVANILLA_NACL) - - set(LINK_CRYPTO_LIBRARY ${NACL_LIBRARIES}) -else() - find_package(SODIUM REQUIRED) - - include_directories(${SODIUM_INCLUDE_DIR}) - - set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARIES}) -endif() - -#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail -if(NOT WIN32) - if(("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")) - message(STATUS "==== ${CMAKE_C_COMPILER_ID} detected - Adding compiler flags ====") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") - endif() -endif() - -macro(linkCoreLibraries exe_name) - add_dependencies(${exe_name} toxcore) - target_link_libraries(${exe_name} toxcore - ${LINK_CRYPTO_LIBRARY}) - - if(WIN32) - target_link_libraries(${exe_name} ws2_32) - endif() -endmacro() - -cmake_policy(SET CMP0011 NEW) - -add_subdirectory(toxcore) -add_subdirectory(testing) -add_subdirectory(other) -add_subdirectory(docs) -if(UNIX) - add_subdirectory(auto_tests) -endif() diff --git a/Makefile.am b/Makefile.am index 7bead885..9f193782 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,20 +11,16 @@ CLEANFILES = $(top_srcdir)/libtoxcore.pc EXTRA_DIST = \ $(top_srcdir)/libtoxcore.pc.in \ - $(top_srcdir)/cmake/FindCheck.cmake \ - $(top_srcdir)/cmake/FindLIBCONFIG.cmake \ - $(top_srcdir)/cmake/FindSphinx.cmake \ - $(top_srcdir)/cmake/FindSODIUM.cmake \ - $(top_srcdir)/cmake/FindNaCl.cmake \ - $(top_srcdir)/cmake/FindCursesw.cmake \ - $(top_srcdir)/docs/CMakeLists.txt \ + $(top_srcdir)/docs/install.rst \ $(top_srcdir)/docs/commands.rst \ $(top_srcdir)/docs/conf.py.in \ $(top_srcdir)/docs/index.rst \ $(top_srcdir)/docs/install.rst \ $(top_srcdir)/docs/start_guide.de.rst \ $(top_srcdir)/docs/start_guide.rst \ - $(top_srcdir)/CMakeLists.txt \ + $(top_srcdir)/docs/updates/Crypto.md \ + $(top_srcdir)/docs/updates/Spam-Prevention.md \ + $(top_srcdir)/docs/updates/Symmetric-NAT-Transversal.md \ $(top_srcdir)/tools/README \ $(top_srcdir)/tools/astylerc \ $(top_srcdir)/tools/pre-commit diff --git a/auto_tests/CMakeLists.txt b/auto_tests/CMakeLists.txt deleted file mode 100644 index c0b6aee4..00000000 --- a/auto_tests/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -cmake_policy(SET CMP0011 NEW) - -include_directories(${CHECK_INCLUDE_DIRS}) - -find_package(Check REQUIRED) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/messenger_test.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/crypto_test.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/friends_test.cmake) - -include( CTest ) -enable_testing() - -add_test(messenger messenger_test) -add_test(crypto crypto_test) -# TODO enable once test is fixed -#add_test(friends friends_test) - -add_custom_target( - test COMMAND ${CMAKE_CTEST_COMMAND} -V - DEPENDS messenger_test crypto_test -) diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc index c15f1089..bd883a79 100644 --- a/auto_tests/Makefile.inc +++ b/auto_tests/Makefile.inc @@ -30,10 +30,5 @@ crypto_test_LDADD = $(LIBSODIUM_LDFLAGS) \ endif -EXTRA_DIST += $(top_srcdir)/auto_tests/CMakeLists.txt \ - $(top_srcdir)/auto_tests/run_tests \ - $(top_srcdir)/auto_tests/cmake/messenger_test.cmake \ - $(top_srcdir)/auto_tests/cmake/crypto_test.cmake \ - $(top_srcdir)/auto_tests/cmake/friends_test.cmake \ - $(top_srcdir)/auto_tests/friends_test.c +EXTRA_DIST += $(top_srcdir)/auto_tests/friends_test.c diff --git a/auto_tests/cmake/crypto_test.cmake b/auto_tests/cmake/crypto_test.cmake deleted file mode 100644 index 9ca9a331..00000000 --- a/auto_tests/cmake/crypto_test.cmake +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(crypto_test C) -set(exe_name crypto_test) - -add_executable(${exe_name} - crypto_test.c) - -linkCoreLibraries(${exe_name}) -add_dependencies(${exe_name} Check) -target_link_libraries(${exe_name} check) diff --git a/auto_tests/cmake/friends_test.cmake b/auto_tests/cmake/friends_test.cmake deleted file mode 100644 index 5c2d0fc6..00000000 --- a/auto_tests/cmake/friends_test.cmake +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(friends_test C) -set(exe_name friends_test) - -add_executable(${exe_name} - friends_test.c) - -linkCoreLibraries(${exe_name}) -add_dependencies(${exe_name} Check) -target_link_libraries(${exe_name} check) diff --git a/auto_tests/cmake/messenger_test.cmake b/auto_tests/cmake/messenger_test.cmake deleted file mode 100644 index 084586bb..00000000 --- a/auto_tests/cmake/messenger_test.cmake +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(messenger_test C) -set(exe_name messenger_test) - -add_executable(${exe_name} - messenger_test.c) - -linkCoreLibraries(${exe_name}) -add_dependencies(${exe_name} Check) -target_link_libraries(${exe_name} check) diff --git a/cmake/FindCheck.cmake b/cmake/FindCheck.cmake deleted file mode 100644 index e9e7f4d1..00000000 --- a/cmake/FindCheck.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# - Try to find the CHECK libraries -# Once done this will define -# -# CHECK_FOUND - system has check -# CHECK_INCLUDE_DIR - the check include directory -# CHECK_LIBRARIES - check library -# -# Copyright (c) 2007 Daniel Gollub -# Copyright (c) 2007 Bjoern Ricks -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -INCLUDE( FindPkgConfig ) - -# Take care about check.pc settings -PKG_SEARCH_MODULE( CHECK check ) - -# Look for CHECK include dir and libraries -IF( NOT CHECK_FOUND ) - - FIND_PATH( CHECK_INCLUDE_DIR check.h ) - - FIND_LIBRARY( CHECK_LIBRARIES NAMES check ) - - IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES ) - SET( CHECK_FOUND 1 ) - IF ( NOT Check_FIND_QUIETLY ) - MESSAGE ( STATUS "Found CHECK: ${CHECK_LIBRARIES}" ) - ENDIF ( NOT Check_FIND_QUIETLY ) - ELSE ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES ) - IF ( Check_FIND_REQUIRED ) - MESSAGE( FATAL_ERROR "Could NOT find CHECK" ) - ELSE ( Check_FIND_REQUIRED ) - IF ( NOT Check_FIND_QUIETLY ) - MESSAGE( STATUS "Could NOT find CHECK" ) - ENDIF ( NOT Check_FIND_QUIETLY ) - ENDIF ( Check_FIND_REQUIRED ) - ENDIF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES ) -ENDIF( NOT CHECK_FOUND ) - -# Hide advanced variables from CMake GUIs -MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES ) - diff --git a/cmake/FindCursesw.cmake b/cmake/FindCursesw.cmake deleted file mode 100644 index bff02cec..00000000 --- a/cmake/FindCursesw.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# - Find the curses include file and library -# -# CURSES_INCLUDE_DIR - the Curses include directory -# CURSES_LIBRARIES - The libraries needed to use Curses -# CURSES_HAVE_WIDE_CHAR - true if wide char is available -# NO_WIDECHAR - Input variable, if set, disable wide char -# ------------------------------------------------------------------------ - - -find_library(CURSES_LIBRARY "curses") -find_library(CURSESW_LIBRARY "cursesw") - -find_library(NCURSES_LIBRARY "ncurses") -find_library(NCURSESW_LIBRARY "ncursesw") - -if(NOT NO_WIDECHAR AND (CURSESW_LIBRARY OR NCURSESW_LIBRARY)) - message(STATUS "Found wide character support") - set(CURSES_HAVE_WIDE_CHAR TRUE) - if(NCURSESW_LIBRARY) - set(CURSES_LIBRARIES ${NCURSESW_LIBRARY}) - else() - set(CURSES_LIBRARIES ${CURSESW_LIBRARY}) - endif() -else() - message(STATUS "Could not found wide character support") - if(NCURSES_LIBRARY) - set(CURSES_LIBRARIES ${NCURSES_LIBRARY}) - else() - set(CURSES_LIBRARIES ${CURSES_LIBRARY}) - endif() -endif() - - -# We use curses.h not ncurses.h so let's not care about that for now - -if(CURSES_HAVE_WIDE_CHAR) - find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncursesw) -else() - find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncurses) -endif() - -set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Cursesw DEFAULT_MSG CURSES_INCLUDE_DIR CURSES_LIBRARIES) - - diff --git a/cmake/FindLIBCONFIG.cmake b/cmake/FindLIBCONFIG.cmake deleted file mode 100644 index b3ae4d11..00000000 --- a/cmake/FindLIBCONFIG.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# Find LIBCONFIG -# -# LIBCONFIG_INCLUDE_DIR -# LIBCONFIG_LIBRARY -# LIBCONFIG_FOUND -# - -if (UNIX) - find_package(PkgConfig QUIET) - pkg_check_modules(_LIBCONFIG QUIET libconfig) -endif () - -FIND_PATH(LIBCONFIG_INCLUDE_DIR NAMES libconfig.h HINTS ${_LIBCONFIG_INCLUDEDIR}) - -FIND_LIBRARY(LIBCONFIG_LIBRARY NAMES config) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCONFIG DEFAULT_MSG LIBCONFIG_LIBRARY LIBCONFIG_INCLUDE_DIR) - -MARK_AS_ADVANCED(LIBCONFIG_INCLUDE_DIR LIBCONFIG_LIBRARY) diff --git a/cmake/FindNaCl.cmake b/cmake/FindNaCl.cmake deleted file mode 100644 index cdd6248a..00000000 --- a/cmake/FindNaCl.cmake +++ /dev/null @@ -1,17 +0,0 @@ -find_path(NACL_INCLUDE_DIR crypto_box.h - $ENV{NACL_INCLUDE_DIR} /usr/include/nacl/ - DOC "Directory which contain NaCl headers") - -find_path(NACL_LIBRARY_DIR libnacl.a - $ENV{NACL_LIBRARY_DIR} /usr/lib/nacl - DOC "Directory which contain libnacl.a, cpucycles.o, and randombytes.o") - -if(NACL_LIBRARY_DIR) - set(NACL_LIBRARIES - "${NACL_LIBRARY_DIR}/cpucycles.o" - "${NACL_LIBRARY_DIR}/libnacl.a" - "${NACL_LIBRARY_DIR}/randombytes.o") -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(NaCl DEFAULT_MSG NACL_INCLUDE_DIR NACL_LIBRARY_DIR NACL_LIBRARIES) diff --git a/cmake/FindSODIUM.cmake b/cmake/FindSODIUM.cmake deleted file mode 100644 index 6b0c2f23..00000000 --- a/cmake/FindSODIUM.cmake +++ /dev/null @@ -1,75 +0,0 @@ -# - Try to find SODIUM -# Once done this will define -# -# SODIUM_ROOT_DIR - Set this variable to the root installation of CMocka -# -# Read-Only variables: -# SODIUM_FOUND - system has SODIUM -# SODIUM_INCLUDE_DIR - the SODIUM include directory -# SODIUM_LIBRARIES - Link these to use SODIUM -# SODIUM_DEFINITIONS - Compiler switches required for using SODIUM -# -#============================================================================= -# Copyright (c) 2013 Andreas Schneider -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# - -set(_SODIUM_ROOT_HINTS -) - -set(_SODIUM_ROOT_PATHS - "$ENV{PROGRAMFILES}/sodium" - "${CMAKE_SOURCE_DIR}/sodium" -) - -find_path(SODIUM_ROOT_DIR - NAMES - include/sodium.h - HINTS - ${_SODIUM_ROOT_HINTS} - PATHS - ${_SODIUM_ROOT_PATHS} -) -mark_as_advanced(SODIUM_ROOT_DIR) - -find_path(SODIUM_INCLUDE_DIR - NAMES - sodium.h - PATHS - ${SODIUM_ROOT_DIR}/include -) - -if(SHARED_LIBSODIUM) - set(WIN32_LIBSODIUM_FILENAME libsodium.dll.a) -else() - set(WIN32_LIBSODIUM_FILENAME libsodium.a) -endif() - -find_library(SODIUM_LIBRARY - NAMES - sodium - ${WIN32_LIBSODIUM_FILENAME} - PATHS - ${SODIUM_ROOT_DIR}/lib -) - -if (SODIUM_LIBRARY) - set(SODIUM_LIBRARIES - ${SODIUM_LIBRARIES} - ${SODIUM_LIBRARY} - ) -endif (SODIUM_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SODIUM DEFAULT_MSG SODIUM_LIBRARIES SODIUM_INCLUDE_DIR) - -# show the SODIUM_INCLUDE_DIR and SODIUM_LIBRARIES variables only in the advanced view -mark_as_advanced(SODIUM_INCLUDE_DIR SODIUM_LIBRARIES) - diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake deleted file mode 100644 index 833bfd4d..00000000 --- a/cmake/FindSphinx.cmake +++ /dev/null @@ -1,16 +0,0 @@ -find_program(SPHINX_EXECUTABLE NAMES sphinx-build - HINTS - $ENV{SPHINX_DIR} - PATH_SUFFIXES bin - DOC "Sphinx documentation generator" -) - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(Sphinx DEFAULT_MSG - SPHINX_EXECUTABLE -) - -mark_as_advanced( - SPHINX_EXECUTABLE -) diff --git a/cmake/InstallPkgConfigFile.cmake b/cmake/InstallPkgConfigFile.cmake deleted file mode 100644 index 7c4e5859..00000000 --- a/cmake/InstallPkgConfigFile.cmake +++ /dev/null @@ -1,78 +0,0 @@ -# A Macro to simplify creating a pkg-config file - -# install_pkg_config_file( -# [VERSION ] -# [DESCRIPTION ] -# [CFLAGS ...] -# [LIBS ...] -# [REQUIRES ...]) -# -# Create and install a pkg-config .pc file to CMAKE_INSTALL_PREFIX/lib/pkgconfig -# assuming the following install layout: -# libraries: CMAKE_INSTALL_PREFIX/lib -# headers : CMAKE_INSTALL_PREFIX/include -# -# example: -# add_library(mylib mylib.c) -# install_pkg_config_file(mylib -# DESCRIPTION My Library -# CFLAGS -# LIBS -lmylib -# REQUIRES glib-2.0 lcm -# VERSION 0.0.1) -# -# -function(install_pkg_config_file) - list(GET ARGV 0 pc_name) - # TODO error check - - set(pc_version 0.0.1) - set(pc_description ${pc_name}) - set(pc_requires "") - set(pc_libs "") - set(pc_cflags "") - set(pc_fname "${CMAKE_BINARY_DIR}/lib/pkgconfig/${pc_name}.pc") - - set(modewords LIBS CFLAGS REQUIRES VERSION DESCRIPTION) - set(curmode "") - - # parse function arguments and populate pkg-config parameters - list(REMOVE_AT ARGV 0) - foreach(word ${ARGV}) - list(FIND modewords ${word} mode_index) - if(${mode_index} GREATER -1) - set(curmode ${word}) - elseif(curmode STREQUAL LIBS) - set(pc_libs "${pc_libs} ${word}") - elseif(curmode STREQUAL CFLAGS) - set(pc_cflags "${pc_cflags} ${word}") - elseif(curmode STREQUAL REQUIRES) - set(pc_requires "${pc_requires} ${word}") - elseif(curmode STREQUAL VERSION) - set(pc_version ${word}) - set(curmode "") - elseif(curmode STREQUAL DESCRIPTION) - set(pc_description "${word}") - set(curmode "") - else(${mode_index} GREATER -1) - message("WARNING incorrect use of install_pkg_config_file (${word})") - break() - endif(${mode_index} GREATER -1) - endforeach(word) - - # write the .pc file out - file(WRITE ${pc_fname} - "prefix=${CMAKE_INSTALL_PREFIX}\n" - "libdir=\${prefix}/lib\n" - "includedir=\${prefix}/include\n" - "\n" - "Name: ${pc_name}\n" - "Description: ${pc_description}\n" - "Requires: ${pc_requires}\n" - "Version: ${pc_version}\n" - "Libs: -L\${libdir} ${pc_libs}\n" - "Cflags: -I\${includedir} ${pc_cflags}\n") - - # mark the .pc file for installation to the lib/pkgconfig directory - install(FILES ${pc_fname} DESTINATION lib/pkgconfig) -endfunction(install_pkg_config_file) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt deleted file mode 100644 index 4b281eb4..00000000 --- a/docs/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -find_package(Sphinx QUIET) - -if(NOT DEFINED SPHINX_THEME) - set(SPHINX_THEME default) -endif() - -if(NOT DEFINED SPHINX_THEME_DIR) - set(SPHINX_THEME_DIR) -endif() - -# configured documentation tools and intermediate build results -set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") - -# Sphinx cache with pickled ReST documents -set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") - -# HTML output directory -set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") - -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" - "${BINARY_BUILD_DIR}/conf.py" - @ONLY) - -if(SPHINX_FOUND) - add_custom_target(docs - ${SPHINX_EXECUTABLE} - -b html - -c "${BINARY_BUILD_DIR}" - -d "${SPHINX_CACHE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}" - "${SPHINX_HTML_DIR}" - COMMENT "Building HTML documentation with Sphinx") -else() - add_custom_target(docs - echo "Please install python-sphinx to build the docs or read the docs online: https://projecttox.readthedocs.org/en/latest" -- COMMENT "No sphinx executable found") -endif() diff --git a/other/CMakeLists.txt b/other/CMakeLists.txt deleted file mode 100644 index 7e6c9eb9..00000000 --- a/other/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) - -cmake_policy(SET CMP0011 NEW) - -if(WIN32) - file(MAKE_DIRECTORY "$ENV{APPDATA}/.config/tox") - file(INSTALL DHTservers DESTINATION "$ENV{APPDATA}/.config/tox") -else() - set(HOME "$ENV{HOME}") - if(APPLE) - file(MAKE_DIRECTORY ${HOME}/Library/Application\ Support/.config/tox) - file(INSTALL DHTservers DESTINATION ${HOME}/Library/Application\ Support/.config/tox) - else() - file(MAKE_DIRECTORY ${HOME}/.config/tox) - file(INSTALL DHTservers DESTINATION ${HOME}/.config/tox) - endif() -endif() - -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DHT_bootstrap.cmake) - -if(LINUX) - add_subdirectory(bootstrap_serverdaemon) -endif() diff --git a/other/Makefile.inc b/other/Makefile.inc index 4f195e63..10ef55a3 100644 --- a/other/Makefile.inc +++ b/other/Makefile.inc @@ -14,7 +14,5 @@ DHT_bootstrap_LDADD = $(LIBSODIUM_LDFLAGS) \ $(LIBSODIUM_LIBS) \ $(WINSOCK2_LIBS) -EXTRA_DIST += $(top_srcdir)/other/cmake/DHT_bootstrap.cmake \ - $(top_srcdir)/other/CMakeLists.txt \ - $(top_srcdir)/other/DHTservers \ +EXTRA_DIST += $(top_srcdir)/other/DHTservers \ $(top_srcdir)/other/tox.png diff --git a/other/bootstrap_serverdaemon/CMakeLists.txt b/other/bootstrap_serverdaemon/CMakeLists.txt deleted file mode 100644 index 512179f3..00000000 --- a/other/bootstrap_serverdaemon/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(DHT_bootstrap_daemon C) - -set(exe_name DHT_bootstrap_daemon) - -find_package(LIBCONFIG REQUIRED) - -include_directories(${LIBCONFIG_INCLUDE_DIR}) - -add_executable(${exe_name} - DHT_bootstrap_daemon.c) - -target_link_libraries(${exe_name} - ${LIBCONFIG_LIBRARY}) - -linkCoreLibraries(${exe_name}) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") -find_package(LibConfig REQUIRED) diff --git a/other/bootstrap_serverdaemon/Makefile.inc b/other/bootstrap_serverdaemon/Makefile.inc index a04475c5..1320b761 100644 --- a/other/bootstrap_serverdaemon/Makefile.inc +++ b/other/bootstrap_serverdaemon/Makefile.inc @@ -20,8 +20,4 @@ endif EXTRA_DIST += \ $(top_srcdir)/other/bootstrap_serverdaemon/server.cfg \ - $(top_srcdir)/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.sh \ - $(top_srcdir)/other/bootstrap_serverdaemon/cmake/Modules \ - $(top_srcdir)/other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake \ - $(top_srcdir)/other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake \ - $(top_srcdir)/other/bootstrap_serverdaemon/CMakeLists.txt + $(top_srcdir)/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.sh diff --git a/other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake b/other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake deleted file mode 100644 index 7d6270e6..00000000 --- a/other/bootstrap_serverdaemon/cmake/Modules/FindLibConfig.cmake +++ /dev/null @@ -1,73 +0,0 @@ -#Ref: https://github.com/schnorr/pajeng/blob/master/cmake/FindLibConfig.cmake -# -# This module defines -# LIBCONFIG_INCLUDE_DIR, where to find cppunit include files, etc. -# LIBCONFIG_LIBRARIES, the libraries to link against to use CppUnit. -# LIBCONFIG_STATIC_LIBRARIY_PATH -# LIBCONFIG_FOUND, If false, do not try to use CppUnit. - -# also defined, but not for general use are -# LIBCONFIG_LIBRARY, where to find the CUnit library. - -#MESSAGE("Searching for libconfig library") - -FIND_PATH(LIBCONFIG_INCLUDE_DIR libconfig.h - /usr/local/include - /usr/include -) - -FIND_PATH(LIBCONFIGPP_INCLUDE_DIR libconfig.h++ - /usr/local/include - /usr/include -) - -FIND_LIBRARY(LIBCONFIG_LIBRARY config - /usr/local/lib - /usr/lib -) - -FIND_LIBRARY(LIBCONFIGPP_LIBRARY config++ - /usr/local/lib - /usr/lib -) - -FIND_LIBRARY(LIBCONFIG_STATIC_LIBRARY "libconfig${CMAKE_STATIC_LIBRARY_SUFFIX}" - /usr/local/lib - /usr/lib -) - -FIND_LIBRARY(LIBCONFIGPP_STATIC_LIBRARY "libconfig++${CMAKE_STATIC_LIBRARY_SUFFIX}" - /usr/local/lib - /usr/lib -) - - -IF(LIBCONFIG_INCLUDE_DIR) - IF(LIBCONFIG_LIBRARY) - SET(LIBCONFIG_FOUND TRUE) - SET(LIBCONFIG_LIBRARIES ${LIBCONFIG_LIBRARY}) - SET(LIBCONFIG_STATIC_LIBRARY_PATH ${LIBCONFIG_STATIC_LIBRARY}) - ENDIF(LIBCONFIG_LIBRARY) -ENDIF(LIBCONFIG_INCLUDE_DIR) - -IF(LIBCONFIGPP_INCLUDE_DIR) - IF(LIBCONFIGPP_LIBRARY) - SET(LIBCONFIGPP_FOUND TRUE) - SET(LIBCONFIGPP_LIBRARIES ${LIBCONFIGPP_LIBRARY}) - SET(LIBCONFIGPP_STATIC_LIBRARY_PATH ${LIBCONFIGPP_STATIC_LIBRARY}) - ENDIF(LIBCONFIGPP_LIBRARY) -ENDIF(LIBCONFIGPP_INCLUDE_DIR) - -IF (LIBCONFIG_FOUND) - IF (NOT LibConfig_FIND_QUIETLY) - MESSAGE(STATUS "Found LibConfig++: ${LIBCONFIGPP_LIBRARIES}" ) - MESSAGE(STATUS "Found LibConfig: ${LIBCONFIG_LIBRARIES}") - MESSAGE(STATUS "static LibConfig path: ${LIBCONFIG_STATIC_LIBRARY_PATH}") - ENDIF (NOT LibConfig_FIND_QUIETLY) -ELSE (LIBCONFIG_FOUND) - IF (LibConfig_FIND_REQUIRED) - MESSAGE(SEND_ERROR "Could NOT find LibConfig") - ENDIF (LibConfig_FIND_REQUIRED) -ENDIF (LIBCONFIG_FOUND) - -MARK_AS_ADVANCED(LIBCONFIG_INCLUDE_DIR LIBCONFIG_LIBRARIES) diff --git a/other/cmake/DHT_bootstrap.cmake b/other/cmake/DHT_bootstrap.cmake deleted file mode 100644 index 403522ab..00000000 --- a/other/cmake/DHT_bootstrap.cmake +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(DHT_bootstrap C) - -set(exe_name DHT_bootstrap) - -add_executable(${exe_name} - DHT_bootstrap.c - ../testing/misc_tools.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt deleted file mode 100644 index 9bab6efb..00000000 --- a/testing/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) - -cmake_policy(SET CMP0011 NEW) - -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DHT_test.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testclient.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testserver.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Messenger_test.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/crypto_speed_test.cmake) - -if(WIN32) - #Do nothing -else() - include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/nTox.cmake) -endif() diff --git a/testing/Makefile.inc b/testing/Makefile.inc index 28604958..067b6ead 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc @@ -87,11 +87,3 @@ crypto_speed_test_LDADD = \ $(LIBSODIUM_LIBS) \ $(WINSOCK2_LIBS) - -EXTRA_DIST += $(top_srcdir)/testing/cmake/Messenger_test.cmake \ - $(top_srcdir)/testing/cmake/DHT_test.cmake \ - $(top_srcdir)/testing/cmake/Lossless_UDP_testclient.cmake \ - $(top_srcdir)/testing/cmake/Lossless_UDP_testserver.cmake \ - $(top_srcdir)/testing/cmake/nTox.cmake \ - $(top_srcdir)/testing/cmake/crypto_speed_test.cmake \ - $(top_srcdir)/testing/CMakeLists.txt diff --git a/testing/cmake/DHT_test.cmake b/testing/cmake/DHT_test.cmake deleted file mode 100644 index bb5bf05f..00000000 --- a/testing/cmake/DHT_test.cmake +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(DHT_test C) - -set(exe_name DHT_test) - -add_executable(${exe_name} - DHT_test.c - misc_tools.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/cmake/Lossless_UDP_testclient.cmake b/testing/cmake/Lossless_UDP_testclient.cmake deleted file mode 100644 index 5f651807..00000000 --- a/testing/cmake/Lossless_UDP_testclient.cmake +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(Lossless_UDP_testclient C) - -set(exe_name Lossless_UDP_testclient) - -add_executable(${exe_name} - Lossless_UDP_testclient.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/cmake/Lossless_UDP_testserver.cmake b/testing/cmake/Lossless_UDP_testserver.cmake deleted file mode 100644 index 26f9302e..00000000 --- a/testing/cmake/Lossless_UDP_testserver.cmake +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(Lossless_UDP_testserver C) - -set(exe_name Lossless_UDP_testserver) - -add_executable(${exe_name} - Lossless_UDP_testserver.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/cmake/Messenger_test.cmake b/testing/cmake/Messenger_test.cmake deleted file mode 100644 index 15fcd77b..00000000 --- a/testing/cmake/Messenger_test.cmake +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(Messenger_test C) - -set(exe_name Messenger_test) - -add_executable(${exe_name} - Messenger_test.c misc_tools.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/cmake/crypto_speed_test.cmake b/testing/cmake/crypto_speed_test.cmake deleted file mode 100644 index c269af5b..00000000 --- a/testing/cmake/crypto_speed_test.cmake +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(crypto_speed_test C) - -set(exe_name crypto_speed_test) - -add_executable(${exe_name} - crypto_speed_test.c) - -linkCoreLibraries(${exe_name}) diff --git a/testing/cmake/nTox.cmake b/testing/cmake/nTox.cmake deleted file mode 100644 index 44476b8f..00000000 --- a/testing/cmake/nTox.cmake +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(nTox C) - -set(exe_name nTox) - -add_executable(${exe_name} - nTox.c misc_tools.c) - -target_link_libraries(${exe_name} - ncurses) - -linkCoreLibraries(${exe_name}) diff --git a/toxcore/CMakeLists.txt b/toxcore/CMakeLists.txt deleted file mode 100644 index ecbb65c2..00000000 --- a/toxcore/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -cmake_minimum_required(VERSION 2.6.0) -project(toxcore C) - -set(core_sources - DHT.c - network.c - Lossless_UDP.c - net_crypto.c - friend_requests.c - LAN_discovery.c - Messenger.c - util.c - ping.c - tox.c) - -set(core_headers - DHT.h - network.h - Lossless_UDP.h - net_crypto.h - friend_requests.h - LAN_discovery.h - Messenger.h - util.h - ping.h) - -add_library(toxcore SHARED ${core_sources}) -add_library(toxcore_static ${core_sources}) -set_target_properties(toxcore_static PROPERTIES OUTPUT_NAME toxcore) - -target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) - -install(TARGETS toxcore toxcore_static DESTINATION lib) -install(FILES ${core_headers} DESTINATION include) - -if(WIN32) - target_link_libraries(toxcore ws2_32) -endif() - -execute_process(COMMAND git rev-list HEAD --count OUTPUT_VARIABLE COMMIT) - -# Write pkgconfig-file: -include(InstallPkgConfigFile) -install_pkg_config_file(toxcore CFLAGS LIBS -ltoxcore REQUIRES VERSION 0.1.1_r${COMMIT}) - diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index a5b245f5..2fd93a22 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -38,5 +38,3 @@ libtoxcore_la_LDFLAGS = -version-info $(LIBTOXCORE_VERSION) \ libtoxcore_la_LIBS = $(LIBSODIUM_LIBS) \ $(WINSOCK2_LIBS) - -EXTRA_DIST += $(top_srcdir)/toxcore/CMakeLists.txt -- cgit v1.2.3