1 2 set(DEUTIL_SRCS 3 deClock.c 4 deClock.h 5 deCommandLine.c 6 deCommandLine.h 7 deDynamicLibrary.c 8 deDynamicLibrary.h 9 deFile.c 10 deFile.h 11 deProcess.c 12 deProcess.h 13 deSocket.c 14 deSocket.h 15 deTimer.c 16 deTimer.h 17 deTimerTest.c 18 deTimerTest.h 19 ) 20 21 set(DEUTIL_LIBS debase dethread depool) 22 23 include_directories( 24 ../debase 25 ../dethread 26 ../depool 27 ) 28 29 if (DE_OS_IS_UNIX) 30 set(DEUTIL_LIBS ${DEUTIL_LIBS} rt dl) 31 endif () 32 33 if (DE_OS_IS_ANDROID) 34 # inline keyword in headers... 35 set_source_files_properties(deSocket.c COMPILE_FLAGS -std=c99) 36 37 set(DEUTIL_LIBS ${DEUTIL_LIBS} dl) 38 endif () 39 40 if (DE_OS_IS_WIN32) 41 set(DEUTIL_LIBS WS2_32) 42 endif () 43 44 if (DE_OS_IS_UNIX) 45 add_definitions(-D_XOPEN_SOURCE=600) 46 endif () 47 48 add_library(deutil STATIC ${DEUTIL_SRCS}) 49 target_link_libraries(deutil ${DEUTIL_LIBS}) 50