Schematic editor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. project (logdiag C)
  2. cmake_minimum_required (VERSION 2.8)
  3. # Default to 2.8 behaviour
  4. cmake_policy (VERSION 2.8)
  5. # Options
  6. option (OPTION_USE_VERA "Use vera++ for source code style checks" OFF)
  7. option (OPTION_NOINSTALL "Only for developers; work without installing" OFF)
  8. if (OPTION_NOINSTALL)
  9. set (OPTION_NOINSTALL 1)
  10. else (OPTION_NOINSTALL)
  11. set (OPTION_NOINSTALL 0)
  12. endif (OPTION_NOINSTALL)
  13. add_definitions (-DGSEAL_ENABLE)
  14. # Project information
  15. set (project_VERSION_MAJOR "0")
  16. set (project_VERSION_MINOR "1")
  17. set (project_VERSION_PATCH "2")
  18. set (project_VERSION "${project_VERSION_MAJOR}")
  19. set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}")
  20. set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
  21. set (project_URL "http://github.com/pjanouch/logdiag")
  22. # For custom modules
  23. set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  24. # Test this machine
  25. include (CheckCSourceCompiles)
  26. CHECK_C_SOURCE_COMPILES (
  27. "typedef struct abc *d;
  28. int test (d __restrict x);
  29. int main (void) {return 0;}"
  30. HAVE_SANE___RESTRICT)
  31. CHECK_C_SOURCE_COMPILES (
  32. "int test (void *restrict x);
  33. int main (void) {return 0;}"
  34. HAVE_RESTRICT)
  35. # Automatic retrieval of dependencies
  36. if (WIN32)
  37. set (WIN32_DEPENDS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/win32-depends)
  38. list (APPEND CMAKE_PREFIX_PATH ${WIN32_DEPENDS_PATH})
  39. list (APPEND CMAKE_INCLUDE_PATH ${WIN32_DEPENDS_PATH}/lib)
  40. list (APPEND CMAKE_C_FLAGS "-mms-bitfields")
  41. if (CMAKE_CROSSCOMPILING)
  42. list (APPEND CMAKE_FIND_ROOT_PATH ${WIN32_DEPENDS_PATH})
  43. endif (CMAKE_CROSSCOMPILING)
  44. add_custom_target (win32-depends COMMAND ${CMAKE_COMMAND} -P
  45. ${CMAKE_CURRENT_SOURCE_DIR}/Win32Depends.cmake
  46. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
  47. add_custom_target (win32-depends-clean COMMAND ${CMAKE_COMMAND} -E
  48. remove_directory ${WIN32_DEPENDS_PATH})
  49. endif (WIN32)
  50. # Generate icons
  51. find_program (CONVERT_EXECUTABLE convert)
  52. mark_as_advanced (CONVERT_EXECUTABLE)
  53. if (CONVERT_EXECUTABLE AND NOT WIN32)
  54. set (icon_base ${CMAKE_CURRENT_SOURCE_DIR}/share/icons/hicolor)
  55. set (icon_svg ${icon_base}/scalable/apps/logdiag.svg)
  56. set (icon_size_list 16x16 32x32 48x48)
  57. set (icon_png_list)
  58. set (icon_symbolic_list)
  59. foreach (icon_size ${icon_size_list})
  60. set (icon_png_path ${icon_base}/${icon_size}/apps)
  61. set (icon_png ${icon_png_path}/logdiag.png)
  62. list (APPEND icon_png_list ${icon_png})
  63. set (icon_symbolic ${CMAKE_PROJECT_NAME}_icons_${icon_size})
  64. list (APPEND icon_symbolic_list ${icon_symbolic})
  65. add_custom_command (OUTPUT ${icon_symbolic}
  66. COMMAND ${CMAKE_COMMAND} -E make_directory ${icon_png_path}
  67. COMMAND ${CONVERT_EXECUTABLE} -background none
  68. -resize ${icon_size} ${icon_svg} ${icon_png}
  69. DEPENDS ${icon_svg} VERBATIM)
  70. set_source_files_properties (${icon_symbolic}
  71. PROPERTIES SYMBOLIC TRUE)
  72. endforeach (icon_size)
  73. set (icon_ico ${CMAKE_CURRENT_SOURCE_DIR}/share/logdiag.ico)
  74. add_custom_target (${CMAKE_PROJECT_NAME}_icons
  75. DEPENDS ${icon_symbolic_list}
  76. COMMAND ${CONVERT_EXECUTABLE} ${icon_png_list} ${icon_ico}
  77. COMMENT "Generating logdiag.ico" VERBATIM)
  78. endif (CONVERT_EXECUTABLE AND NOT WIN32)
  79. # Dependencies
  80. find_package (GTK2 2.12 REQUIRED gtk)
  81. find_package (JsonGlib REQUIRED)
  82. find_package (PkgConfig REQUIRED)
  83. pkg_search_module (Lua52 REQUIRED lua5.2 lua-5.2 lua>=5.2)
  84. # Localization
  85. find_package (Gettext REQUIRED)
  86. file (GLOB project_PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/po/*.po)
  87. GETTEXT_CREATE_TRANSLATIONS (
  88. ${CMAKE_CURRENT_SOURCE_DIR}/po/${CMAKE_PROJECT_NAME}.pot
  89. ALL ${project_PO_FILES})
  90. foreach (file ${project_PO_FILES})
  91. get_filename_component (translation "${file}" NAME_WE)
  92. list (APPEND project_TRANSLATIONS "${translation}")
  93. endforeach (file)
  94. # Documentation
  95. # TODO: Add pregenerated docs to the tree
  96. find_package (GtkDoc)
  97. set (project_DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/docs/reference")
  98. # Project source files
  99. set (liblogdiag_SOURCES
  100. liblogdiag/ld-marshal.c
  101. liblogdiag/ld-types.c
  102. liblogdiag/ld-undo-action.c
  103. liblogdiag/ld-diagram.c
  104. liblogdiag/ld-diagram-object.c
  105. liblogdiag/ld-diagram-symbol.c
  106. liblogdiag/ld-diagram-connection.c
  107. liblogdiag/ld-diagram-view.c
  108. liblogdiag/ld-library.c
  109. liblogdiag/ld-category-view.c
  110. liblogdiag/ld-category-tree-view.c
  111. liblogdiag/ld-category-symbol-view.c
  112. liblogdiag/ld-category.c
  113. liblogdiag/ld-symbol.c
  114. liblogdiag/ld-lua.c
  115. liblogdiag/ld-lua-symbol.c)
  116. set (liblogdiag_HEADERS
  117. ${CMAKE_CURRENT_BINARY_DIR}/config.h
  118. liblogdiag/liblogdiag.h
  119. liblogdiag/ld-marshal.h
  120. liblogdiag/ld-types.h
  121. liblogdiag/ld-undo-action.h
  122. liblogdiag/ld-diagram.h
  123. liblogdiag/ld-diagram-object.h
  124. liblogdiag/ld-diagram-symbol.h
  125. liblogdiag/ld-diagram-connection.h
  126. liblogdiag/ld-diagram-view.h
  127. liblogdiag/ld-library.h
  128. liblogdiag/ld-category-view.h
  129. liblogdiag/ld-category-tree-view.h
  130. liblogdiag/ld-category-symbol-view.h
  131. liblogdiag/ld-category.h
  132. liblogdiag/ld-symbol.h
  133. liblogdiag/ld-lua.h
  134. liblogdiag/ld-lua-private.h
  135. liblogdiag/ld-lua-symbol.h
  136. liblogdiag/ld-lua-symbol-private.h)
  137. set (logdiag_TESTS
  138. point-array
  139. diagram)
  140. set (logdiag_SOURCES
  141. src/ld-window-main.c
  142. src/logdiag.c)
  143. set (logdiag_HEADERS
  144. ${liblogdiag_HEADERS}
  145. src/ld-window-main.h)
  146. # Resource compilation for MinGW
  147. if (MINGW)
  148. set (CMAKE_RC_COMPILER_INIT windres)
  149. enable_language (RC)
  150. set (CMAKE_RC_FLAGS "-O coff")
  151. set (CMAKE_RC_COMPILE_OBJECT
  152. "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>")
  153. endif (MINGW)
  154. if (WIN32)
  155. set (logdiag_SOURCES
  156. ${logdiag_SOURCES}
  157. share/logdiag.rc)
  158. endif (WIN32)
  159. # Generate a configure file
  160. configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
  161. ${CMAKE_CURRENT_BINARY_DIR}/config.h)
  162. include_directories (${CMAKE_CURRENT_BINARY_DIR})
  163. # Generate marshallers
  164. find_program (GLIB_GENMARSHAL_EXECUTABLE glib-genmarshal)
  165. if (NOT GLIB_GENMARSHAL_EXECUTABLE)
  166. message (FATAL_ERROR "glib-genmarshal not found")
  167. endif (NOT GLIB_GENMARSHAL_EXECUTABLE)
  168. function (glib_genmarshal base prefix)
  169. get_filename_component (base_path "${base}" PATH)
  170. get_filename_component (base_name "${base}" NAME)
  171. set (command_base ${GLIB_GENMARSHAL_EXECUTABLE}
  172. --prefix ${prefix} "${base_name}.list")
  173. # On Windows, the final makefile may contain:
  174. # cd e:\abc && ...
  175. # That won't actually change the directory. We have to do:
  176. # cd e:\abc && e: && ...
  177. if (WIN32 AND "${base_path}" MATCHES "^.:[/\\\\]")
  178. string (SUBSTRING "${base_path}" 0 2 base_drive)
  179. set (command_base "${base_drive}" && "${command_base}")
  180. endif (WIN32 AND "${base_path}" MATCHES "^.:[/\\\\]")
  181. # NOTE: VERBATIM would cause problems, so it is not used here
  182. add_custom_command (OUTPUT ${base}.c
  183. COMMAND ${command_base} --body > "${base_name}.c"
  184. DEPENDS "${base}.list"
  185. WORKING_DIRECTORY "${base_path}"
  186. COMMENT "Generating marshallers source file")
  187. add_custom_command (OUTPUT ${base}.h
  188. COMMAND ${command_base} --header > "${base_name}.h"
  189. DEPENDS "${base}.list"
  190. WORKING_DIRECTORY "${base_path}"
  191. COMMENT "Generating marshallers header file")
  192. endfunction (glib_genmarshal)
  193. glib_genmarshal (${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag/ld-marshal
  194. ld_marshal)
  195. include_directories (${CMAKE_CURRENT_SOURCE_DIR})
  196. include_directories (${GTK2_INCLUDE_DIRS}
  197. ${JSON_GLIB_INCLUDE_DIRS} ${Lua52_INCLUDE_DIRS})
  198. set (logdiag_LIBS ${GTK2_LIBRARIES}
  199. ${JSON_GLIB_LIBRARIES} ${Lua52_LIBRARIES})
  200. if (WIN32)
  201. find_package (LibIntl REQUIRED)
  202. list (APPEND logdiag_LIBS ${LIBINTL_LIBRARIES})
  203. endif (WIN32)
  204. # Build the library
  205. add_library (liblogdiag STATIC ${liblogdiag_SOURCES} ${liblogdiag_HEADERS})
  206. set_target_properties (liblogdiag PROPERTIES OUTPUT_NAME logdiag)
  207. # Build the executable
  208. add_executable (logdiag WIN32 ${logdiag_SOURCES} ${logdiag_HEADERS})
  209. target_link_libraries (logdiag liblogdiag ${logdiag_LIBS})
  210. # Testing
  211. option (BUILD_TESTING "Build tests" OFF)
  212. if (BUILD_TESTING)
  213. enable_testing ()
  214. foreach (name ${logdiag_TESTS})
  215. add_executable (test-${name} tests/${name}.c)
  216. target_link_libraries (test-${name} liblogdiag ${logdiag_LIBS})
  217. add_test (test-${name} test-${name})
  218. endforeach (name)
  219. endif (BUILD_TESTING)
  220. # Generate documentation
  221. if (GTK_DOC_FOUND)
  222. GTK_DOC_RUN (WORKING_DIR ${project_DOC_DIR}
  223. SOURCE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag
  224. SCANGOBJ liblogdiag ${logdiag_LIBS}
  225. XML ${project_DOC_DIR}/xml --sgml-mode
  226. HTML ${project_DOC_DIR}/html)
  227. endif (GTK_DOC_FOUND)
  228. find_package (CppCheck)
  229. GENERATE_CPPCHECK (SOURCES liblogdiag src tests ENABLE_IDS all
  230. TARGET_NAME ${CMAKE_PROJECT_NAME}_cppcheck INCLUDES ${CMAKE_CURRENT_BINARY_DIR})
  231. if (OPTION_USE_VERA)
  232. # Force this off, we don't need it
  233. option (VERA_LUA "" OFF)
  234. # Make it build within the same build tree
  235. get_directory_property (backup_includes INCLUDE_DIRECTORIES)
  236. set_directory_properties (PROPERTIES INCLUDE_DIRECTORIES "")
  237. set (backup_source_dir "${CMAKE_SOURCE_DIR}")
  238. set (CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/vera++")
  239. add_subdirectory ("vera++")
  240. set_directory_properties (PROPERTIES INCLUDE_DIRECTORIES "${backup_includes}")
  241. set (CMAKE_SOURCE_DIR "${backup_source_dir}")
  242. # Check the sources
  243. # XXX: maybe do it per source file and not all at once
  244. set (vera_srcs ${liblogdiag_SOURCES} ${logdiag_SOURCES} ${logdiag_HEADERS})
  245. set (vera_output ${CMAKE_CURRENT_BINARY_DIR}/vera.log)
  246. add_custom_command (OUTPUT ${vera_output}
  247. COMMAND vera
  248. -R F001 -R L001 -R T001 -R T004 -R T005 -R T006
  249. -R T007 -R T009 -R T010 -R T015 -R T017 -R T018
  250. -R L004 -P max-line-length=80
  251. -R L005 -P max-consecutive-empty-lines=2
  252. --root ${CMAKE_SOURCE_DIR}/vera++
  253. --std-report=-
  254. --std-report=${vera_output}
  255. --warning -s
  256. ${vera_srcs}
  257. DEPENDS ${vera_srcs}
  258. WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  259. COMMENT "Checking style for logdiag")
  260. add_custom_target (logdiag_vera ALL DEPENDS ${vera_output})
  261. endif (OPTION_USE_VERA)
  262. # GSettings
  263. find_program (GLIB_COMPILE_SCHEMAS_EXECUTABLE glib-compile-schemas)
  264. if (NOT GLIB_COMPILE_SCHEMAS_EXECUTABLE)
  265. message (FATAL_ERROR "glib-compile-schemas not found")
  266. endif (NOT GLIB_COMPILE_SCHEMAS_EXECUTABLE)
  267. set (GSETTINGS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/share")
  268. set (GSETTINGS_SCHEMAS "${GSETTINGS_DIR}/org.logdiag.gschema.xml")
  269. add_custom_target (${CMAKE_PROJECT_NAME}_gschema_check
  270. COMMAND ${GLIB_COMPILE_SCHEMAS_EXECUTABLE} --dry-run "${GSETTINGS_DIR}"
  271. DEPENDS "${GSETTINGS_SCHEMAS}"
  272. COMMENT "Checking GSettings schema files" VERBATIM)
  273. if (OPTION_NOINSTALL)
  274. set (GSETTINGS_COMPILED_SCHEMA "${CMAKE_CURRENT_BINARY_DIR}/gschemas.compiled")
  275. add_custom_command (OUTPUT "${GSETTINGS_COMPILED_SCHEMA}"
  276. COMMAND ${GLIB_COMPILE_SCHEMAS_EXECUTABLE}
  277. "--targetdir=${CMAKE_CURRENT_BINARY_DIR}" "${GSETTINGS_DIR}"
  278. DEPENDS "${GSETTINGS_SCHEMAS}"
  279. COMMENT "Compiling GSettings schema files" VERBATIM)
  280. add_custom_target (${CMAKE_PROJECT_NAME}_gschema ALL
  281. DEPENDS "${GSETTINGS_COMPILED_SCHEMA}")
  282. endif (OPTION_NOINSTALL)
  283. # Installation
  284. install (FILES ${GSETTINGS_SCHEMAS}
  285. DESTINATION share/glib-2.0/schemas)
  286. install (CODE " # DESTDIR is not in use on Windows
  287. if (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")
  288. execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS_EXECUTABLE}
  289. \"\${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas\")
  290. endif (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")")
  291. install (DIRECTORY share/gui share/library
  292. DESTINATION share/${CMAKE_PROJECT_NAME})
  293. if (WIN32)
  294. install (TARGETS logdiag DESTINATION .)
  295. install (DIRECTORY
  296. ${WIN32_DEPENDS_PATH}/bin/
  297. DESTINATION .
  298. FILES_MATCHING PATTERN "*.dll"
  299. PATTERN "libgettext*" EXCLUDE)
  300. install (DIRECTORY
  301. ${WIN32_DEPENDS_PATH}/etc/
  302. DESTINATION etc)
  303. install (DIRECTORY
  304. ${WIN32_DEPENDS_PATH}/lib/glib-2.0
  305. ${WIN32_DEPENDS_PATH}/lib/gtk-2.0
  306. ${WIN32_DEPENDS_PATH}/lib/gdk-pixbuf-2.0
  307. DESTINATION lib)
  308. install (DIRECTORY
  309. ${WIN32_DEPENDS_PATH}/share/themes/MS-Windows
  310. DESTINATION share/themes)
  311. # Avoid partial translations
  312. file (GLOB locales ${WIN32_DEPENDS_PATH}/share/locale/*)
  313. foreach (locale ${locales})
  314. get_filename_component (translation ${locale} NAME)
  315. list (FIND project_TRANSLATIONS ${translation} translation_found)
  316. if (translation_found GREATER -1)
  317. install (DIRECTORY
  318. ${WIN32_DEPENDS_PATH}/share/locale/${translation}
  319. DESTINATION share/locale)
  320. endif (translation_found GREATER -1)
  321. endforeach (locale)
  322. else (WIN32)
  323. install (TARGETS logdiag DESTINATION bin)
  324. install (FILES share/logdiag.desktop DESTINATION share/applications)
  325. install (FILES share/logdiag.xml DESTINATION share/mime/packages)
  326. install (DIRECTORY share/icons DESTINATION share)
  327. # Don't install the documentation yet as we don't install any library
  328. # install (DIRECTORY "${project_DOC_DIR}/html/"
  329. # DESTINATION share/gtk-doc/html/${CMAKE_PROJECT_NAME})
  330. install (FILES LICENSE NEWS DESTINATION share/doc/${CMAKE_PROJECT_NAME})
  331. endif (WIN32)
  332. # CPack
  333. set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Schematic editor")
  334. set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
  335. set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p.janouch@gmail.com>")
  336. set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
  337. set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR})
  338. set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR})
  339. set (CPACK_PACKAGE_VERSION_PATCH ${project_VERSION_PATCH})
  340. if (WIN32)
  341. set (CPACK_GENERATOR "NSIS;ZIP")
  342. else (WIN32)
  343. set (CPACK_GENERATOR "TGZ;ZIP")
  344. set (CPACK_SET_DESTDIR TRUE)
  345. endif (WIN32)
  346. set (CPACK_PACKAGE_FILE_NAME
  347. "${CMAKE_PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
  348. set (CPACK_PACKAGE_INSTALL_DIRECTORY
  349. "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
  350. # FIXME: It is possible to install multiple copies. Everything screws up then.
  351. set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/share\\\\header.bmp")
  352. set (CPACK_NSIS_INSTALLED_ICON_NAME "logdiag.exe")
  353. set (CPACK_NSIS_CREATE_ICONS_EXTRA "
  354. CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\logdiag.lnk' '\$INSTDIR\\\\logdiag.exe'")
  355. set (CPACK_NSIS_DELETE_ICONS_EXTRA "
  356. Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\logdiag.lnk'")
  357. set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
  358. WriteRegStr HKCR '.ldd' '' 'logdiag.Diagram'
  359. WriteRegStr HKCR 'logdiag.Diagram' '' 'logdiag Diagram'
  360. WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\open\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
  361. WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\edit\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
  362. System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
  363. set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
  364. DeleteRegKey HKCR 'logdiag.Diagram'
  365. System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
  366. string (REPLACE "http://" "http:\\\\\\\\" project_URL_NSIS "${project_URL}")
  367. set (CPACK_NSIS_URL_INFO_ABOUT "${project_URL_NSIS}")
  368. set (CPACK_DEBIAN_PACKAGE_DEPENDS
  369. "libgtk2.0-0 (>= 2.12), libjson-glib-1.0-0 (>= 0.10.4), liblua5.1-0")
  370. set (CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
  371. "libgtk2.0-dev (>= 2.12), libjson-glib-dev (>= 0.10.4), liblua5.1-0-dev")
  372. set (CPACK_DEBIAN_PACKAGE_SECTION "Electronics")
  373. set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${project_URL}")
  374. set (CPACK_RPM_PACKAGE_REQUIRES "gtk2 >= 2.12, json-glib >= 0.10.4, lua = 5.1")
  375. set (CPACK_RPM_PACKAGE_GROUP "Graphics")
  376. set (CPACK_RPM_PACKAGE_LICENSE "BSD")
  377. set (CPACK_RPM_PACKAGE_URL "${project_URL}")
  378. set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
  379. set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user;/win32-depends;/liblogdiag/ld-marshal.[ch]")
  380. set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${project_VERSION}")
  381. include (CPack)