• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# cmake file for debase
2
3if (NOT DE_DEFS)
4	message(FATAL_ERROR "Include Defs.cmake")
5endif ()
6
7set(DEBASE_SRCS
8	deDefs.c
9	deDefs.h
10	deFloat16.c
11	deFloat16.h
12	deInt32.c
13	deInt32.h
14	deInt32Test.c
15	deMath.c
16	deMath.h
17	deMathTest.c
18	deMemory.c
19	deMemory.h
20	deRandom.c
21	deRandom.h
22	deString.c
23	deString.h
24	deSha1.c
25	deSha1.h
26	)
27
28add_library(debase STATIC ${DEBASE_SRCS})
29
30# link debase to libm on unix systems
31if (DE_OS_IS_UNIX)
32	find_library(MATH_LIBRARY NAMES libm m PATHS /usr/lib /lib)
33	if (NOT MATH_LIBRARY)
34		message(FATAL_ERROR "Can't find libm.")
35	endif (NOT MATH_LIBRARY)
36	target_link_libraries(debase ${MATH_LIBRARY})
37
38	add_definitions(-D_XOPEN_SOURCE=600)
39endif ()
40
41if (DE_OS_IS_ANDROID)
42	find_library(C_LIBRARY NAMES c PATHS /usr/lib /lib)
43	find_library(M_LIBRARY NAMES m PATHS /usr/lib /lib)
44	find_library(LOG_LIBRARY NAMES log PATHS /usr/lib)
45	target_link_libraries(debase ${C_LIBRARY} ${M_LIBRARY} ${LOG_LIBRARY} gcc)
46endif ()
47
48if (DE_OS_IS_SYMBIAN)
49    target_link_libraries(debase gcc)
50endif()
51