1 # cmake file for debase 2 3 if (NOT DE_DEFS) 4 message(FATAL_ERROR "Include Defs.cmake") 5 endif () 6 7 set(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 28 add_library(debase STATIC ${DEBASE_SRCS}) 29 30 # link debase to libm on unix systems 31 if (DE_OS_IS_UNIX) 32 target_link_libraries(debase m) 33 34 add_definitions(-D_XOPEN_SOURCE=600) 35 endif () 36 37 if (DE_OS_IS_ANDROID) 38 find_library(C_LIBRARY NAMES c PATHS /usr/lib /lib) 39 find_library(M_LIBRARY NAMES m PATHS /usr/lib /lib) 40 find_library(LOG_LIBRARY NAMES log PATHS /usr/lib) 41 target_link_libraries(debase ${C_LIBRARY} ${M_LIBRARY} ${LOG_LIBRARY} gcc) 42 endif () 43 44 if (DE_OS_IS_SYMBIAN) 45 target_link_libraries(debase gcc) 46 endif() 47