mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 10:44:43 +08:00
Fix cmake builds
This commit is contained in:
1 parent
6eb93c4c4e
commit
42b29fbb63
5 files changed
+12
-6
No files matched your search
+2
-1
@@ -36,7 +36,8 @@ option(WITH_STATIC "build with static libraries." ON)
|
||||
|
||||
# Run platform tests
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/configure.cmake)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_SOURCE_DIR}/src/config.h)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_BINARY_DIR}/src/config.h)
|
||||
add_definitions(-I$(CMAKE_BINARY_DIR)/src)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# pkg-config
|
||||
|
||||
@@ -53,6 +53,12 @@
|
||||
/* Define to 1 if you have the <linux/if.h> header file. */
|
||||
#cmakedefine HAVE_LINUX_IF_H 1
|
||||
|
||||
/* Define to 1 if you have the <linux/tcp.h> header file. */
|
||||
#cmakedefine HAVE_LINUX_TCP_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#cmakedefine HAVE_NETINET_TCP_H
|
||||
|
||||
/* Define to 1 if you have the <linux/netfilter_ipv4.h> header file. */
|
||||
#cmakedefine HAVE_LINUX_NETFILTER_IPV4_H 1
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ check_function_exists(memset HAVE_MEMSET)
|
||||
|
||||
check_include_files(netdb.h HAVE_NETDB_H)
|
||||
check_include_files(netinet/in.h HAVE_NETINET_IN_H)
|
||||
check_include_files(netinet/tcp.h HAVE_NETINET_TCP_H)
|
||||
check_include_files(linux/tcp.h HAVE_LINUX_TCP_H)
|
||||
check_include_files(net/if.h HAVE_NET_IF_H)
|
||||
check_include_files(pcre.h HAVE_PCRE_H)
|
||||
check_include_files(pcre/pcre.h HAVE_PCRE_PCRE_H)
|
||||
@@ -87,8 +89,7 @@ set(NDEBUG 1)
|
||||
set(PACKAGE ${PROJECT_NAME})
|
||||
set(PACKAGE_BUGREPORT max.c.lv@gmail.com)
|
||||
set(PACKAGE_NAME ${PROJECT_NAME})
|
||||
#set(PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
set(PACKAGE_VERSION 3.0.2)
|
||||
set(PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
|
||||
set(PACKAGE_TARNAME ${PROJECT_NAME})
|
||||
set(PACKAGE_URL "")
|
||||
|
||||
@@ -38,10 +38,8 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef LIB_ONLY
|
||||
#include <pthread.h>
|
||||
#include "shadowsocks.h"
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
#if HAVE_LINUX_TCP_H
|
||||
#ifdef HAVE_LINUX_TCP_H
|
||||
#include <linux/tcp.h>
|
||||
#elif defined(HAVE_NETINET_TCP_H)
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
Reference in new issue
Block a user