blob: 527b192fe74a314a21a68e1ee3a799dbb2ce26cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
### Required
cmake_minimum_required(VERSION 2.6)
project(libproxy)
INCLUDE(CTest)
### Enable packaging
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 4)
set(CPACK_PACKAGE_VERSION_PATCH 2)
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_IGNORE_FILES "CMakeCache.txt;install_manifest.txt;utils/proxy$;/Testing/;/Makefile$;\\\\.cmake$;\\\\.tar.gz$;\\\\.so[.0-9]*$;/build/;/_CPack_Packages/;/CMakeFiles/;/CVS/;/\\\\.svn/;/\\\\.git/;\\\\.swp$;\\\\.#;/#")
set(CPACK_SOURCE_IGNORE_FILES ${CPACK_IGNORE_FILES})
SET(CPACK_SOURCE_TBZ2 OFF)
SET(CPACK_SOURCE_TZ OFF)
SET(CPACK_SOURCE_TGZ ON)
SET(CPACK_SOURCE_ZIP ON)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "libproxy-${CPACK_PACKAGE_VERSION}")
SET(CPACK_SOURCE_TOPLEVEL_TAG "")
include(CPack)
### Globals
# Set the version
set(CMAKE_PROJECT_VERSION "${CPACK_PACKAGE_VERSION}")
# Enable testing
enable_testing()
# Setup our relative paths
if(${WIN32})
set(rlibdir .)
set(rmoduledir modules/)
set(rlibexecdir .)
set(rbindir .)
set(rincludedir include/)
set(rdatadir .)
else()
set(rlibdir lib${LIB_SUFFIX}/)
set(rmoduledir ${rlibdir}${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_VERSION}/modules/)
set(rlibexecdir libexec/)
set(rbindir bin/)
set(rincludedir include/)
set(rdatadir share/)
endif()
# Setup our full paths
set(prefix ${CMAKE_INSTALL_PREFIX} CACHE PATH "prefix")
set(libdir ${prefix}/${rlibdir} CACHE PATH "libdir")
set(moduledir ${prefix}/${rmoduledir} CACHE PATH "moduledir")
set(libexecdir ${prefix}/${rlibexecdir} CACHE PATH "libexecdir")
set(bindir ${prefix}/${rbindir} CACHE PATH "bindir")
set(includedir ${prefix}/${rincludedir} CACHE PATH "includedir")
set(datadir ${prefix}/${rdatadir} CACHE PATH "datadir")
# Add a global compilation stuff
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
else()
add_definitions(-D_POSIX_C_SOURCE=1)
set(CMAKE_CXX_FLAGS "-g -Wall -Werror -fvisibility=hidden -Os ${CMAKE_CXX_FLAGS}")
endif()
### Subdirectories
add_subdirectory(libmodman)
add_subdirectory(libproxy)
add_subdirectory(bindings)
add_subdirectory(utils)
|