OSDN Git Service

binding with libharu.
[putex/putex.git] / src / texsourc / lib / libhpdf / src / CMakeLists.txt
1 # src/CMakeLists.txt
2 #
3 # Copyright (C) 2008  Werner Smekal
4 #
5 # create library
6 # =======================================================================
7 # libharu source files
8 # =======================================================================
9 set(
10   libharu_SRCS
11         hpdf_annotation.c
12         hpdf_array.c
13         hpdf_binary.c
14         hpdf_boolean.c
15         hpdf_catalog.c
16         hpdf_destination.c
17         hpdf_dict.c
18         hpdf_doc_png.c
19         hpdf_doc.c
20         hpdf_encoder_cns.c
21         hpdf_encoder_cnt.c
22         hpdf_encoder_jp.c
23         hpdf_encoder_kr.c
24         hpdf_encoder.c
25         hpdf_encrypt.c
26         hpdf_encryptdict.c
27         hpdf_error.c
28         hpdf_ext_gstate.c
29         hpdf_font_cid.c
30         hpdf_font_tt.c
31         hpdf_font_type1.c
32         hpdf_font.c
33         hpdf_fontdef_base14.c
34         hpdf_fontdef_cid.c
35         hpdf_fontdef_cns.c
36         hpdf_fontdef_cnt.c
37         hpdf_fontdef_jp.c
38         hpdf_fontdef_kr.c
39         hpdf_fontdef_tt.c
40         hpdf_fontdef_type1.c
41         hpdf_fontdef.c
42         hpdf_gstate.c
43         hpdf_image_ccitt.c
44         hpdf_image_png.c
45         hpdf_image.c
46         hpdf_info.c
47         hpdf_list.c
48         hpdf_mmgr.c
49         hpdf_name.c
50         hpdf_namedict.c
51         hpdf_null.c
52         hpdf_number.c
53         hpdf_objects.c
54         hpdf_outline.c
55         hpdf_page_label.c
56         hpdf_page_operator.c
57         hpdf_pages.c
58         hpdf_real.c
59         hpdf_streams.c
60         hpdf_string.c
61         hpdf_u3d.c
62         hpdf_utils.c
63         hpdf_xref.c
64         hpdf_pdfa.c
65         hpdf_3dmeasure.c
66         hpdf_exdata.c
67         hpdf_encoder_utf.c
68 )
69
70 IF(NOT DEFINED ${HAVE_LIBPNG})
71 ADD_DEFINITIONS(-DLIBHPDF_HAVE_NOPNGLIB)
72 ENDIF(NOT DEFINED ${HAVE_LIBPNG})
73
74 # =======================================================================
75 # create static and shared haru library
76 # =======================================================================
77 if(LIBHARU_STATIC)
78   add_library(${LIBHARU_NAME_STATIC} STATIC ${libharu_SRCS})
79   target_link_libraries(${LIBHARU_NAME_STATIC} ${ADDITIONAL_LIBRARIES})
80   install(
81     TARGETS ${LIBHARU_NAME_STATIC}
82     ARCHIVE DESTINATION lib
83     LIBRARY DESTINATION lib
84     RUNTIME DESTINATION bin
85   )
86   if(WIN32 AND NOT CYGWIN)
87                 foreach(addlib ${ADDITIONAL_LIBRARIES})
88                         install(FILES ${addlib} DESTINATION lib)
89                 endforeach(addlib)
90   endif(WIN32 AND NOT CYGWIN)
91 endif(LIBHARU_STATIC)
92 if(LIBHARU_SHARED)
93   add_library(${LIBHARU_NAME} SHARED ${libharu_SRCS})
94   target_link_libraries(${LIBHARU_NAME} ${ADDITIONAL_LIBRARIES})
95   if(WIN32 AND NOT CYGWIN)
96         set_target_properties(${LIBHARU_NAME} PROPERTIES DEFINE_SYMBOL HPDF_DLL_MAKE)
97   endif(WIN32 AND NOT CYGWIN)
98   install(
99     TARGETS ${LIBHARU_NAME}
100     ARCHIVE DESTINATION lib
101     LIBRARY DESTINATION lib
102     RUNTIME DESTINATION bin
103   )
104 endif(LIBHARU_SHARED)