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 ) 25 26add_library(debase STATIC ${DEBASE_SRCS}) 27 28# link debase to libm on unix systems 29if (DE_OS_IS_UNIX) 30 find_library(MATH_LIBRARY NAMES libm m PATHS /usr/lib /lib) 31 if (NOT MATH_LIBRARY) 32 message(FATAL_ERROR "Can't find libm.") 33 endif (NOT MATH_LIBRARY) 34 target_link_libraries(debase ${MATH_LIBRARY}) 35 36 add_definitions(-D_XOPEN_SOURCE=600) 37endif () 38 39if (DE_OS_IS_ANDROID) 40 find_library(C_LIBRARY NAMES c PATHS /usr/lib /lib) 41 find_library(M_LIBRARY NAMES m PATHS /usr/lib /lib) 42 find_library(LOG_LIBRARY NAMES log PATHS /usr/lib) 43 target_link_libraries(debase ${C_LIBRARY} ${M_LIBRARY} ${LOG_LIBRARY} gcc) 44endif () 45 46if (DE_OS_IS_SYMBIAN) 47 target_link_libraries(debase gcc) 48endif() 49