1 2set(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 21set(DEUTIL_LIBS debase dethread depool) 22 23include_directories( 24 ../debase 25 ../dethread 26 ../depool 27 ) 28 29if (DE_OS_IS_UNIX) 30 set(DEUTIL_LIBS ${DEUTIL_LIBS} rt dl) 31endif () 32 33if (DE_OS_IS_ANDROID) 34 # inline keyword in headers... 35 set_source_files_properties(deSocket.c COMPILE_FLAGS -std=c99) 36endif () 37 38if (DE_OS_IS_WIN32) 39 set(DEUTIL_LIBS ${DEUTIL_LIBS} ws2_32) 40endif () 41 42if (DE_OS_IS_UNIX OR DE_OS_IS_QNX) 43 add_definitions(-D_XOPEN_SOURCE=600) 44endif () 45 46add_library(deutil STATIC ${DEUTIL_SRCS}) 47target_link_libraries(deutil ${DEUTIL_LIBS}) 48