summaryrefslogtreecommitdiff
path: root/print/libharu/files/patch-demo_CMakeLists.txt
blob: cb142a8ed4fbcce1599b732cb0a2a903b568becc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- demo/CMakeLists.txt.orig	2013-10-30 14:11:59.000000000 +0100
+++ demo/CMakeLists.txt	2014-10-13 10:52:19.000000000 +0200
@@ -61,7 +61,7 @@
   # =======================================================================
   foreach(demo ${demos_NAMES})
     add_executable(${demo} ${demo}.c)
-    target_link_libraries(${demo} ${_LIBHPDF_LIB})
+    target_link_libraries(${demo} ${_LIBHPDF_LIB} m)
     if(DEMO_C_FLAGS)
       set_target_properties(${demo} PROPERTIES COMPILE_FLAGS ${DEMO_C_FLAGS})
     endif(DEMO_C_FLAGS)
@@ -70,7 +70,7 @@
   # some demos need grid_sheet.c compiled in
   foreach(demo ${demos_with_grid_NAMES})
     add_executable(${demo} ${demo}.c grid_sheet.c)
-    target_link_libraries(${demo} ${_LIBHPDF_LIB})
+    target_link_libraries(${demo} ${_LIBHPDF_LIB} m)
     if(DEMO_C_FLAGS)
       set_target_properties(${demo} PROPERTIES COMPILE_FLAGS ${DEMO_C_FLAGS})
     endif(DEMO_C_FLAGS)
@@ -75,6 +75,7 @@
       set_target_properties(${demo} PROPERTIES COMPILE_FLAGS ${DEMO_C_FLAGS})
     endif(DEMO_C_FLAGS)
   endforeach(demo)
+  target_link_libraries(text_demo2 m)
     
   # the grid_sheet demo needs extra defines
   add_executable(grid_sheet grid_sheet.c)
@@ -86,15 +87,15 @@
   # =======================================================================
   install(
     TARGETS ${demos_NAMES} ${demos_with_grid_NAMES} grid_sheet
-    DESTINATION demo
+    DESTINATION ${EXAMPLESDIR}
   )
   foreach(demo ${demos_NAMES} ${demos_with_grid_NAMES} grid_sheet)
-    install(FILES ${demo}.c DESTINATION demo)
+    install(FILES ${demo}.c DESTINATION ${EXAMPLESDIR})
   endforeach(demo)
 
   # install demo files
   install(
     DIRECTORY images mbtext pngsuite rawimage ttfont type1
-    DESTINATION demo
+    DESTINATION ${EXAMPLESDIR}
   )
 endif(LIBHPDF_EXAMPLES)