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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  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. option (BUILD_TESTING "Build tests" OFF)
  9. # Project information
  10. set (project_VERSION_MAJOR "0")
  11. set (project_VERSION_MINOR "2")
  12. set (project_VERSION_PATCH "0")
  13. set (project_VERSION "${project_VERSION_MAJOR}")
  14. set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}")
  15. set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
  16. set (project_URL "https://git.janouch.name/p/logdiag")
  17. # For custom modules
  18. set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
  19. # Automatic retrieval of dependencies
  20. if (WIN32)
  21. set (WIN32_DEPENDS_PATH ${PROJECT_SOURCE_DIR}/win32-depends)
  22. list (APPEND CMAKE_PREFIX_PATH ${WIN32_DEPENDS_PATH})
  23. list (APPEND CMAKE_INCLUDE_PATH ${WIN32_DEPENDS_PATH}/lib)
  24. list (APPEND CMAKE_C_FLAGS "-mms-bitfields")
  25. if (CMAKE_CROSSCOMPILING)
  26. list (APPEND CMAKE_FIND_ROOT_PATH ${WIN32_DEPENDS_PATH})
  27. endif (CMAKE_CROSSCOMPILING)
  28. set (PKG_CONFIG_USE_CMAKE_PREFIX_PATH FALSE)
  29. # Seems like there is a regression setting this to two paths in one,
  30. # setting the path manually
  31. set (ENV{PKG_CONFIG_PATH} "${WIN32_DEPENDS_PATH}/lib/pkgconfig")
  32. add_custom_target (win32-depends COMMAND ${CMAKE_COMMAND} -P
  33. ${PROJECT_SOURCE_DIR}/Win32Depends.cmake
  34. WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
  35. add_custom_target (win32-depends-clean COMMAND ${CMAKE_COMMAND} -E
  36. remove_directory ${WIN32_DEPENDS_PATH})
  37. endif (WIN32)
  38. # Generate icons
  39. find_program (CONVERT_EXECUTABLE convert)
  40. mark_as_advanced (CONVERT_EXECUTABLE)
  41. if (CONVERT_EXECUTABLE AND NOT WIN32)
  42. set (icon_base ${PROJECT_SOURCE_DIR}/share/icons/hicolor)
  43. set (icon_svg ${icon_base}/scalable/apps/logdiag.svg)
  44. set (icon_size_list 16x16 32x32 48x48)
  45. set (icon_png_list)
  46. set (icon_symbolic_list)
  47. foreach (icon_size ${icon_size_list})
  48. set (icon_png_path ${icon_base}/${icon_size}/apps)
  49. set (icon_png ${icon_png_path}/logdiag.png)
  50. list (APPEND icon_png_list ${icon_png})
  51. set (icon_symbolic ${PROJECT_NAME}_icons_${icon_size})
  52. list (APPEND icon_symbolic_list ${icon_symbolic})
  53. add_custom_command (OUTPUT ${icon_symbolic}
  54. COMMAND ${CMAKE_COMMAND} -E make_directory ${icon_png_path}
  55. COMMAND ${CONVERT_EXECUTABLE} -background none
  56. -resize ${icon_size} ${icon_svg} ${icon_png}
  57. DEPENDS ${icon_svg} VERBATIM)
  58. set_source_files_properties (${icon_symbolic}
  59. PROPERTIES SYMBOLIC TRUE)
  60. endforeach (icon_size)
  61. set (icon_ico ${PROJECT_SOURCE_DIR}/share/logdiag.ico)
  62. add_custom_target (${PROJECT_NAME}_icons
  63. DEPENDS ${icon_symbolic_list}
  64. COMMAND ${CONVERT_EXECUTABLE} ${icon_png_list} ${icon_ico}
  65. COMMENT "Generating logdiag.ico" VERBATIM)
  66. endif (CONVERT_EXECUTABLE AND NOT WIN32)
  67. # Dependencies
  68. find_package (PkgConfig REQUIRED)
  69. pkg_check_modules (GTK3 REQUIRED gtk+-3.0 json-glib-1.0)
  70. if (NOT WIN32)
  71. pkg_search_module (Lua REQUIRED lua>=5.2 lua5.3 lua-5.3 lua5.2 lua-5.2)
  72. else (NOT WIN32)
  73. # For whatever reason this now seems to be required
  74. set (LUA_INCLUDE_DIR "${WIN32_DEPENDS_PATH}/include")
  75. # XXX: this seems to require CMake 3.0 ... include it in the project?
  76. find_package (Lua REQUIRED)
  77. if (LUA_VERSION_STRING VERSION_LESS "5.2")
  78. message (FATAL_ERROR "Lua 5.2 not found")
  79. endif (LUA_VERSION_STRING VERSION_LESS "5.2")
  80. set (Lua_LIBRARIES ${LUA_LIBRARIES})
  81. set (Lua_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
  82. endif (NOT WIN32)
  83. # This actually fucks up MinGW cross-compilation if omitted
  84. link_directories (${GTK3_LIBRARY_DIRS})
  85. # Localization
  86. find_package (Gettext REQUIRED)
  87. file (GLOB project_PO_FILES ${PROJECT_SOURCE_DIR}/po/*.po)
  88. GETTEXT_CREATE_TRANSLATIONS (
  89. ${PROJECT_SOURCE_DIR}/po/${PROJECT_NAME}.pot
  90. ALL ${project_PO_FILES})
  91. foreach (file ${project_PO_FILES})
  92. get_filename_component (translation "${file}" NAME_WE)
  93. list (APPEND project_TRANSLATIONS "${translation}")
  94. endforeach (file)
  95. # Documentation
  96. find_package (GtkDoc 1.25)
  97. set (project_DOC_DIR "${PROJECT_BINARY_DIR}/liblogdiag")
  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. ${PROJECT_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 (${PROJECT_SOURCE_DIR}/config.h.in
  161. ${PROJECT_BINARY_DIR}/config.h)
  162. include_directories (${PROJECT_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 (${PROJECT_SOURCE_DIR}/liblogdiag/ld-marshal
  194. ld_marshal)
  195. include_directories (${PROJECT_SOURCE_DIR})
  196. include_directories (${GTK3_INCLUDE_DIRS} ${Lua_INCLUDE_DIRS})
  197. set (logdiag_LIBS ${GTK3_LIBRARIES} ${Lua_LIBRARIES} m)
  198. if (WIN32)
  199. find_package (LibIntl REQUIRED)
  200. list (APPEND logdiag_LIBS ${LIBINTL_LIBRARIES})
  201. endif (WIN32)
  202. # Build the library
  203. add_library (liblogdiag STATIC ${liblogdiag_SOURCES} ${liblogdiag_HEADERS})
  204. set_target_properties (liblogdiag PROPERTIES OUTPUT_NAME logdiag)
  205. # Build the executable
  206. add_executable (logdiag WIN32 ${logdiag_SOURCES} ${logdiag_HEADERS})
  207. target_link_libraries (logdiag liblogdiag ${logdiag_LIBS})
  208. # Testing
  209. if (BUILD_TESTING)
  210. enable_testing ()
  211. foreach (name ${logdiag_TESTS})
  212. add_executable (test-${name} tests/${name}.c)
  213. target_link_libraries (test-${name} liblogdiag ${logdiag_LIBS})
  214. add_test (test-${name} test-${name})
  215. endforeach (name)
  216. endif (BUILD_TESTING)
  217. # Generate documentation
  218. if (GTKDOC_FOUND)
  219. # FIXME: not our bug but xml/gtkdocentities.ent cannot be passed
  220. target_link_libraries (liblogdiag ${logdiag_LIBS})
  221. gtk_doc_add_module (liblogdiag
  222. SOURCE ${PROJECT_SOURCE_DIR}/liblogdiag
  223. SUFFIXES c h
  224. # The "official" module wants an XML file I don't want to give it
  225. XML ${PROJECT_BINARY_DIR}/liblogdiag/liblogdiag-docs.xml
  226. LIBRARIES liblogdiag)
  227. endif ()
  228. find_package (CppCheck)
  229. GENERATE_CPPCHECK (SOURCES liblogdiag src tests ENABLE_IDS all
  230. TARGET_NAME ${PROJECT_NAME}_cppcheck INCLUDES ${PROJECT_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 ${PROJECT_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 "${PROJECT_SOURCE_DIR}/share")
  268. set (GSETTINGS_SCHEMAS "${GSETTINGS_DIR}/org.logdiag.gschema.xml")
  269. add_custom_target (${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 "${PROJECT_BINARY_DIR}/gschemas.compiled")
  275. add_custom_command (OUTPUT "${GSETTINGS_COMPILED_SCHEMA}"
  276. COMMAND ${GLIB_COMPILE_SCHEMAS_EXECUTABLE}
  277. "--targetdir=${PROJECT_BINARY_DIR}" "${GSETTINGS_DIR}"
  278. DEPENDS "${GSETTINGS_SCHEMAS}"
  279. COMMENT "Compiling GSettings schema files" VERBATIM)
  280. add_custom_target (${PROJECT_NAME}_gschema ALL
  281. DEPENDS "${GSETTINGS_COMPILED_SCHEMA}")
  282. endif (OPTION_NOINSTALL)
  283. # Installation
  284. if (WIN32)
  285. install (TARGETS logdiag DESTINATION .)
  286. install (DIRECTORY
  287. ${WIN32_DEPENDS_PATH}/bin/
  288. DESTINATION .
  289. FILES_MATCHING PATTERN "*.dll"
  290. PATTERN "libgettext*" EXCLUDE)
  291. install (DIRECTORY
  292. ${WIN32_DEPENDS_PATH}/etc/
  293. DESTINATION etc)
  294. install (DIRECTORY
  295. ${WIN32_DEPENDS_PATH}/lib/gdk-pixbuf-2.0
  296. DESTINATION lib)
  297. install (DIRECTORY
  298. ${WIN32_DEPENDS_PATH}/share/glib-2.0/schemas
  299. DESTINATION share/glib-2.0
  300. FILES_MATCHING PATTERN "org.gtk.Settings.*")
  301. install (FILES
  302. ${WIN32_DEPENDS_PATH}/share/icons/hicolor/index.theme
  303. DESTINATION share/icons/hicolor)
  304. install (DIRECTORY share/icons DESTINATION share)
  305. # Avoid partial translations
  306. file (GLOB locales ${WIN32_DEPENDS_PATH}/share/locale/*)
  307. foreach (locale ${locales})
  308. get_filename_component (translation ${locale} NAME)
  309. list (FIND project_TRANSLATIONS ${translation} translation_found)
  310. if (translation_found GREATER -1)
  311. install (DIRECTORY
  312. ${WIN32_DEPENDS_PATH}/share/locale/${translation}
  313. DESTINATION share/locale)
  314. endif (translation_found GREATER -1)
  315. endforeach (locale)
  316. else (WIN32)
  317. install (TARGETS logdiag DESTINATION bin)
  318. install (FILES share/logdiag.desktop DESTINATION share/applications)
  319. install (FILES share/logdiag.xml DESTINATION share/mime/packages)
  320. install (DIRECTORY share/icons DESTINATION share)
  321. # Don't install the documentation yet as we don't install any library
  322. # install (DIRECTORY "${project_DOC_DIR}/html/"
  323. # DESTINATION share/gtk-doc/html/${PROJECT_NAME})
  324. install (FILES LICENSE NEWS DESTINATION share/doc/${PROJECT_NAME})
  325. endif (WIN32)
  326. install (FILES ${GSETTINGS_SCHEMAS}
  327. DESTINATION share/glib-2.0/schemas)
  328. install (CODE " # DESTDIR is not in use on Windows
  329. if (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")
  330. execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS_EXECUTABLE}
  331. \"\${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas\")
  332. endif (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")")
  333. install (DIRECTORY share/gui share/library
  334. DESTINATION share/${PROJECT_NAME})
  335. # CPack
  336. set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Schematic editor")
  337. set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
  338. set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p@janouch.name>")
  339. set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
  340. set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR})
  341. set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR})
  342. set (CPACK_PACKAGE_VERSION_PATCH ${project_VERSION_PATCH})
  343. if (WIN32)
  344. set (CPACK_GENERATOR "NSIS;ZIP")
  345. else (WIN32)
  346. set (CPACK_GENERATOR "TGZ;ZIP")
  347. set (CPACK_SET_DESTDIR TRUE)
  348. endif (WIN32)
  349. set (CPACK_PACKAGE_FILE_NAME
  350. "${PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
  351. set (CPACK_PACKAGE_INSTALL_DIRECTORY
  352. "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
  353. # FIXME: It is possible to install multiple copies. Everything screws up then.
  354. set (CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/share\\\\header.bmp")
  355. set (CPACK_NSIS_INSTALLED_ICON_NAME "logdiag.exe")
  356. set (CPACK_NSIS_CREATE_ICONS_EXTRA "
  357. CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\logdiag.lnk' '\$INSTDIR\\\\logdiag.exe'")
  358. set (CPACK_NSIS_DELETE_ICONS_EXTRA "
  359. Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\logdiag.lnk'")
  360. set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
  361. WriteRegStr HKCR '.ldd' '' 'logdiag.Diagram'
  362. WriteRegStr HKCR 'logdiag.Diagram' '' 'logdiag Diagram'
  363. WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\open\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
  364. WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\edit\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
  365. System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
  366. set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
  367. DeleteRegKey HKCR 'logdiag.Diagram'
  368. System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
  369. string (REPLACE "https://" "https:\\\\\\\\" project_URL_NSIS "${project_URL}")
  370. set (CPACK_NSIS_URL_INFO_ABOUT "${project_URL_NSIS}")
  371. set (CPACK_DEBIAN_PACKAGE_DEPENDS
  372. "libgtk3.0-0 (>= 3.8), libjson-glib-1.0-0 (>= 0.10.4), liblua5.2-0")
  373. set (CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
  374. "libgtk3.0-dev (>= 3.8), libjson-glib-dev (>= 0.10.4), liblua5.2-0-dev")
  375. set (CPACK_DEBIAN_PACKAGE_SECTION "Electronics")
  376. set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${project_URL}")
  377. set (CPACK_RPM_PACKAGE_REQUIRES "gtk3 >= 3.8, json-glib >= 0.10.4, lua = 5.2")
  378. set (CPACK_RPM_PACKAGE_GROUP "Graphics")
  379. set (CPACK_RPM_PACKAGE_LICENSE "ISC")
  380. set (CPACK_RPM_PACKAGE_URL "${project_URL}")
  381. set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
  382. set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user;/win32-depends;/liblogdiag/ld-marshal.[ch]")
  383. set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${project_VERSION}")
  384. include (CPack)