File: CMakeDependencies.cmake

package info (click to toggle)
libjson-rpc-cpp 0.7.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,124 kB
  • sloc: cpp: 6,491; xml: 202; sh: 65; makefile: 13
file content (57 lines) | stat: -rw-r--r-- 1,796 bytes parent folder | download | duplicates (4)
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
# all dependencies that are not directly included in the libjson-rpc-cpp distribution are defined here!
# default search directory for dependencies is ${CMAKE_SOURCE_DIR}/win32-deps (for backwards compatibility)
# if your dependencies directory is different, please run cmake with CMAKE_PREFIX_PATH option eg:
#
# cmake -DCMAKE_PREFIX_PATH=path_to_your_dependencies .

# set default dependencies search path
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CMAKE_SOURCE_DIR}/win32-deps")

# find JSONCPP
# TODO: handle windows debug libraries!
# TODO: fix FindJSONCPP file!
find_package(Jsoncpp)
message(STATUS "Jsoncpp header: ${JSONCPP_INCLUDE_DIRS}")
message(STATUS "Jsoncpp lib   : ${JSONCPP_LIBRARIES}")
message(STATUS "Jsoncpp prefix: ${JSONCPP_INCLUDE_PREFIX}")

# find Threads!
find_package(Threads)
message(STATUS "Threads: ${CMAKE_THREADS_LIBS_INIT}")

# find Argtable
if(${COMPILE_STUBGEN})
	find_package(Argtable REQUIRED)
	message(STATUS "Argtable header: ${ARGTABLE_INCLUDE_DIRS}")
	message(STATUS "Argtable lib   : ${ARGTABLE_LIBRARIES}")
endif()

if(${HTTP_CLIENT})
# find CURL
	find_package(CURL REQUIRED)
	message(STATUS "CURL header: ${CURL_INCLUDE_DIRS}")
	message(STATUS "CURL lib   : ${CURL_LIBRARIES}")
endif()

if (${HTTP_SERVER})
# find libmicrohttpd
	find_package(MHD REQUIRED)
	message(STATUS "MHD header: ${MHD_INCLUDE_DIRS}")
	message(STATUS "MHD lib   : ${MHD_LIBRARIES}")
endif()

# find doxygen
find_package(Doxygen)

if (${COMPILE_TESTS})

	find_package(Catch)
	if(NOT CATCH_FOUND)
		message("Could not find catch, downloading it now")
    	# Includes Catch in the project:
	   	add_subdirectory(${CMAKE_SOURCE_DIR}/src/catch)
	   	include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
	else()
    	INCLUDE_DIRECTORIES(${CATCH_INCLUDE_DIRS})
	endif()
endif()