cmake source definitions:
[blender.git] / source / blender / blenfont / CMakeLists.txt
index 8df4034..0258a41 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-FILE(GLOB SRC intern/*.c)
+set(INC
+       .
+       ../blenlib
+       ../makesdna
+       ../editors/include
+       ../blenkernel
+       ../../../intern/guardedalloc
+)
 
-SET(INC 
-       ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include
-       ../blenkernel ../../../extern/glew/include .
+set(INC_SYS
+       ${GLEW_INCLUDE_PATH}
        ${FREETYPE_INCLUDE_DIRS}
 )
 
-IF(WITH_INTERNATIONAL)
-       SET(INC ${INC} ${GETTEXT_INC})
-       ADD_DEFINITIONS(-DINTERNATIONAL)
-ENDIF(WITH_INTERNATIONAL)
+set(SRC
+       intern/blf.c
+       intern/blf_dir.c
+       intern/blf_font.c
+       intern/blf_glyph.c
+       intern/blf_lang.c
+       intern/blf_util.c
+
+       BLF_api.h
+       intern/blf_internal.h
+       intern/blf_internal_types.h
+)
+
+if(WITH_INTERNATIONAL)
+       list(APPEND INC_SYS
+               ${GETTEXT_INC}
+       )
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WIN32)
-       ADD_DEFINITIONS(-D_WIN32 -DUSE_GETTEXT_DLL)
-ENDIF(WIN32)
+if(WIN32 AND NOT UNIX)
+       add_definitions(-DUSE_GETTEXT_DLL)
+endif()
 
-BLENDERLIB(bf_blenfont "${SRC}" "${INC}")
+blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")