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 deFloat16Test.c 13 deInt32.c 14 deInt32.h 15 deInt32Test.c 16 deMath.c 17 deMath.h 18 deMathTest.c 19 deMemory.c 20 deMemory.h 21 deRandom.c 22 deRandom.h 23 deString.c 24 deString.h 25 deSha1.c 26 deSha1.h 27 ) 28 29 add_library(debase STATIC ${DEBASE_SRCS}) 30 31 # link debase to libm on unix systems 32 if (DE_OS_IS_UNIX OR DE_OS_IS_QNX) 33 target_link_libraries(debase m) 34 35 add_definitions(-D_XOPEN_SOURCE=600) 36 endif () 37 38 if (DE_OS_IS_ANDROID) 39 find_library(C_LIBRARY NAMES c PATHS /usr/lib /lib) 40 find_library(M_LIBRARY NAMES m PATHS /usr/lib /lib) 41 find_library(LOG_LIBRARY NAMES log PATHS /usr/lib) 42 target_link_libraries(debase ${C_LIBRARY} ${M_LIBRARY} ${LOG_LIBRARY} gcc) 43 endif () 44 45 if (DE_OS_IS_SYMBIAN) 46 target_link_libraries(debase gcc) 47 endif() 48