Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated cmake macros

  • Loading branch information...
commit 2ac62a150dd333e51aa995c54289ec0d65374ae8 2 parents 1a821c3 + 3907d38
Peter Drahoš authored
23  CMakeLists.txt
@@ -187,26 +187,7 @@ endif ( USE_EXT_GD )
187 187
 add_subdirectory ( tests )
188 188
 add_subdirectory ( examples )
189 189
 
190  
-set ( CPACK_PACKAGE_NAME "libgd" )
191  
-set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "libGD, powerful and easy to use graphic library" )
192  
-set ( CPACK_PACKAGE_VENDOR "http://www.libgd.org" )
193  
-set ( CPACK_PACKAGE_VERSION_MAJOR "2" )
194  
-set ( CPACK_PACKAGE_VERSION_MINOR "1" )
195  
-set ( CPACK_PACKAGE_VERSION_PATCH "0" )
196  
-
197  
-if ( WIN32 )
198  
-  set ( CPACK_GENERATOR ZIP )
199  
-else ( WIN32 )
200  
-  set ( CPACK_GENERATOR TGZ )
201  
-endif ( WIN32 )
202  
-
203  
-set ( CPACK_SOURCE_GENERATOR TGZ )
204  
-set ( CPACK_SOURCE_IGNORE_FILES "~$" "\\\\.swp$" "\\\\.cvsignore$" "^${PROJECT_SOURCE_DIR}.*/CVS/" 
205  
-  "^${PROJECT_SOURCE_DIR}/debian/" "^${PROJECT_SOURCE_DIR}/old/" "^${PROJECT_SOURCE_DIR}/bld/" 
206  
-  "^${PROJECT_SOURCE_DIR}/autom4te\\\\.cache/" )
207  
-#~ install(FILES ${top_level_DOCFILES} DESTINATION ${DOC_DIR})	# LuaDist: ???
208  
-include ( CPack )
209  
-
210  
-# LuaDist: install additional stuff
  190
+install_doc ( ${top_level_DOCFILES} )
  191
+
211 192
 install_data ( ChangeLog NEWS docs/README.TXT docs/README-JPEG.TXT docs/README.JPN 
212 193
   docs/README.TESTING )
5  Readme
... ...
@@ -1,5 +0,0 @@
1  
-Sorry, this package in not at the moment provided by LuaDist in source form.
2  
-
3  
-Please use your native system package manager to install libgd-2.0.35.
4  
-
5  
-On windows or systems lacking any package management install libgd manually.
89  examples/CMakeLists.txt
... ...
@@ -1,54 +1,41 @@
1  
-include_directories (BEFORE "${GD_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}")
2  
-
3  
-SET(TESTS_FILES
4  
-#  resize
5  
-#  ellipseaa
6  
-#  ellipse
7  
-  arc
8  
-#  ellipsearc
9  
-  crop
10  
-#  ellfullaa
11  
-  tgaread
12  
- # nnquant
13  
-  gif
14  
-)
15  
-
16  
-if (JPEG_FOUND)
17  
-	SET(TESTS_FILES
18  
-		"${TESTS_FILES}"
19  
-		nnquant
20  
-		copyrotated
21  
-		flip
22  
-	)
23  
-endif (JPEG_FOUND)
24  
-
25  
-
26  
-if (TIFF_FOUND)
27  
-	SET(TESTS_FILES
28  
-		"${TESTS_FILES}"
29  
-		tiffread
30  
-	)
31  
-endif (TIFF_FOUND)
32  
-
33  
-FOREACH(test_name ${TESTS_FILES})
34  
-	add_executable(${test_name} "${test_name}.c")
35  
-	target_link_libraries (${test_name} ${GD_LIB})
36  
-	
  1
+include_directories ( BEFORE "${GD_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}" )
  2
+
  3
+set ( TESTS_FILES #  resize
  4
+  #  ellipseaa
  5
+  #  ellipse
  6
+  #  ellipsearc
  7
+  #  ellfullaa
  8
+  # nnquant
  9
+  gif )
  10
+if ( PNG_FOUND )
  11
+  set ( TESTS_FILES "${TESTS_FILES}" arc crop tgaread )
  12
+endif ( )
  13
+
  14
+if ( JPEG_FOUND )
  15
+  set ( TESTS_FILES "${TESTS_FILES}" nnquant copyrotated flip )
  16
+endif ( JPEG_FOUND )
  17
+
  18
+if ( TIFF_FOUND )
  19
+  set ( TESTS_FILES "${TESTS_FILES}" tiffread )
  20
+endif ( TIFF_FOUND )
  21
+
  22
+foreach ( test_name ${TESTS_FILES} )
  23
+	add_executable ( ${test_name} "${test_name}.c" )
  24
+	target_link_libraries ( ${test_name} ${GD_LIB} )
37 25
 	# LuaDist: added instalation of examples:
38  
-	install(TARGETS ${test_name} RUNTIME DESTINATION ${INSTALL_EXAMPLE} LIBRARY DESTINATION ${INSTALL_EXAMPLE} ARCHIVE DESTINATION ${INSTALL_EXAMPLE})
39  
-ENDFOREACH(test_name)
40  
-
41  
-if (WIN32 AND NOT MINGW AND NOT MSYS)
42  
-	add_executable(windows WIN32 "windows.c")
43  
-	target_link_libraries (windows ${GD_LIB})
44  
-else (WIN32 AND NOT MINGW AND NOT MSYS)
45  
-	if (MINGW OR MSYS)
46  
-		add_executable(windows "windows.c")
47  
-		add_definitions("-mwindows")
48  
-		target_link_libraries(windows ${GD_LIB} stdc++ gdi32)
49  
-	endif (MINGW OR MSYS)
50  
-endif (WIN32 AND NOT MINGW AND NOT MSYS)
51  
-
  26
+	install ( TARGETS ${test_name} DESTINATION ${INSTALL_EXAMPLE} COMPONENT Example )
  27
+endforeach ( test_name )
  28
+
  29
+if ( WIN32 AND NOT MINGW AND NOT MSYS )
  30
+  add_executable ( windows WIN32 "windows.c" )
  31
+  target_link_libraries ( windows ${GD_LIB} )
  32
+else ( WIN32 AND NOT MINGW AND NOT MSYS )
  33
+  if ( MINGW OR MSYS )
  34
+    add_executable ( windows "windows.c" )
  35
+    add_definitions ( "-mwindows" )
  36
+    target_link_libraries ( windows ${GD_LIB} stdc++ gdi32 )
  37
+  endif ( MINGW OR MSYS )
  38
+endif ( WIN32 AND NOT MINGW AND NOT MSYS )
52 39
 
53 40
 # LuaDist: install sample images
54  
-install(FILES noIcon.pic test_crop_threshold.png noIcon.sgi noIcon.tga noIconAlpha.tga DESTINATION ${INSTALL_EXAMPLE})
  41
+install_example ( noIcon.pic test_crop_threshold.png noIcon.sgi noIcon.tga noIconAlpha.tga  )

0 notes on commit 2ac62a1

Please sign in to comment.
Something went wrong with that request. Please try again.