forked from eiskaltdcpp/eiskaltdcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0edffe3
Showing
465 changed files
with
78,689 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
project (eiskaltdcpp) | ||
cmake_minimum_required (VERSION 2.6) | ||
set (PROJECT_NAME_GLOBAL eiskaltdcpp) | ||
|
||
set (VERSION "2.0.0") | ||
|
||
include (CheckIncludeFile) | ||
include (CheckIncludeFiles) | ||
include (CheckFunctionExists) | ||
include (FindPkgConfig) | ||
|
||
CHECK_INCLUDE_FILE (malloc.h HAVE_MALLOC_H) | ||
CHECK_INCLUDE_FILE (dlfcn.h HAVE_DLFCN_H) | ||
CHECK_INCLUDE_FILE (inttypes.h HAVE_INTTYPES_H) | ||
CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO) | ||
CHECK_FUNCTION_EXISTS(malloc_stats HAVE_MALLOC_STATS) | ||
CHECK_FUNCTION_EXISTS(malloc_trim HAVE_MALLOC_TRIM) | ||
CHECK_INCLUDE_FILE (memory.h HAVE_MEMORY_H) | ||
CHECK_INCLUDE_FILE (stdint.h HAVE_STDINT_H) | ||
CHECK_INCLUDE_FILE (stdlib.h HAVE_STDLIB_H) | ||
CHECK_INCLUDE_FILE (strings.h HAVE_STRINGS_H) | ||
CHECK_INCLUDE_FILE (sys/stat.h HAVE_SYS_STAT_H) | ||
CHECK_INCLUDE_FILE (sys/types.h HAVE_SYS_TYPES_H) | ||
CHECK_INCLUDE_FILE (unistd.h HAVE_UNISTD_H) | ||
CHECK_INCLUDE_FILE (sys/socket.h HAVE_SYS_SOCKET_H) | ||
CHECK_INCLUDE_FILE (ifaddrs.h HAVE_IFADDRS_H) | ||
CHECK_INCLUDE_FILE (net/if.h HAVE_NET_IF_H) | ||
CHECK_INCLUDE_FILES ("sys/socket.h;net/if.h;ifaddrs.h;sys/types.h" HAVE_ADDRS_H) | ||
|
||
find_package (BZip2 REQUIRED) | ||
find_package (Boost REQUIRED) | ||
find_package (ZLIB REQUIRED) | ||
find_package (OpenSSL REQUIRED) | ||
find_package (Threads REQUIRED) | ||
find_package (Gettext REQUIRED) | ||
find_package (Qt4 4.5 COMPONENTS QtCore QtGui QtXml REQUIRED ) | ||
find_package (PkgConfig) | ||
|
||
pkg_check_modules (PC_UPNP libupnp) | ||
|
||
set (UPNP_DEFINITIONS ${PC_UPNP_CFLAGS_OTHER}) | ||
|
||
find_path(UPNP_INCLUDE_DIR upnp/upnp.h | ||
HINTS | ||
${PC_UPNP_INCLUDEDIR} | ||
${PC_UPNP_INCLUDE_DIRS} | ||
PATH_SUFFIXES upnp) | ||
|
||
find_library(UPNP_LIBRARY upnp | ||
HINTS | ||
${PC_UPNP_LIBDIR} | ||
${PC_UPNP_LIBRARY_DIRS}) | ||
|
||
if (UPNP_INCLUDE_DIR AND UPNP_LIBRARY) | ||
set (UPNP_FOUND 1) | ||
endif (UPNP_INCLUDE_DIR AND UPNP_LIBRARY) | ||
if (UPNP_FOUND) | ||
message (STATUS "Found the upnp libraries at ${UPNP_LIBRARY}") | ||
message (STATUS "Found the upnp headers at ${UPNP_INCLUDE_DIR}") | ||
else (UPNP_FOUND) | ||
message (STATUS "Could not find upnp") | ||
endif (UPNP_FOUND) | ||
|
||
if (NOT CMAKE_INSTALL_PREFIX) | ||
set (CMAKE_INSTALL_PREFIX "/usr") | ||
endif (NOT CMAKE_INSTALL_PREFIX) | ||
|
||
if (LIB_INSTALL_DIR) | ||
set (LIBDIR ${LIB_INSTALL_DIR}) | ||
endif (LIB_INSTALL_DIR) | ||
|
||
if (NOT LIBDIR) | ||
set (LIBDIR "lib") | ||
message (STATUS "Library directory: ${CMAKE_INSTALL_PREFIX}/${LIBDIR}") | ||
endif (NOT LIBDIR) | ||
|
||
if (NOT CMAKE_BUILD_TYPE) | ||
set (CMAKE_BUILD_TYPE "RelWithDebInfo") | ||
endif (NOT CMAKE_BUILD_TYPE) | ||
|
||
if (UNIX AND NOT BUNDLE) | ||
set (DATAPATH "share/eiskaltdcpp") | ||
elseif (BUNDLE EQUAL 1) | ||
set (DATAPATH "./") | ||
endif (UNIX AND NOT BUNDLE) | ||
|
||
set (SHARE_DIR "share") | ||
set (CLIENT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${SHARE_DIR}/${PROJECT_NAME_GLOBAL}") | ||
set (_DATADIR "${CLIENT_DATA_DIR}") | ||
|
||
message (STATUS "Data directory: ${CLIENT_DATA_DIR}") | ||
|
||
if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
add_definitions (-D_GNU_SOURCE -D_LARGEFILE_SOURCE) | ||
endif (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
|
||
set (CLIENT_TRANSLATIONS_DEST "${CLIENT_DATA_DIR}/ts") | ||
set (CLIENT_SOUNDS_DEST "${CLIENT_DATA_DIR}/sounds") | ||
set (CLIENT_ICONS_DEST "${CLIENT_DATA_DIR}/icons") | ||
|
||
add_definitions (-pipe -I. -fno-builtin -D_FILE_OFFSET_BITS=64 | ||
-D_REENTRANT -D_DATADIR="${_DATADIR}" | ||
-DNDEBUG -DBUILDING_DCPP) | ||
|
||
add_subdirectory (dcpp) | ||
add_subdirectory (eiskaltdcpp) | ||
CONFIGURE_FILE( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | ||
IMMEDIATE @ONLY) | ||
ADD_CUSTOM_TARGET(uninstall | ||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") | ||
|
Oops, something went wrong.