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