parent
ab5ca0cf8b
commit
7edd9720cd
|
@ -1,5 +1,5 @@
|
||||||
project (wdmtg C)
|
cmake_minimum_required (VERSION 3.0)
|
||||||
cmake_minimum_required (VERSION 2.8.12)
|
project (wdmtg VERSION 0.1.0 LANGUAGES C)
|
||||||
|
|
||||||
# Vala really sucks at producing good C code
|
# Vala really sucks at producing good C code
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
@ -10,9 +10,6 @@ endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
|
||||||
# Options
|
# Options
|
||||||
option (OPTION_NOINSTALL "Only for developers; work without installing" OFF)
|
option (OPTION_NOINSTALL "Only for developers; work without installing" OFF)
|
||||||
|
|
||||||
# Version
|
|
||||||
set (project_VERSION "0.1.0")
|
|
||||||
|
|
||||||
# Set some variables
|
# Set some variables
|
||||||
if (OPTION_NOINSTALL)
|
if (OPTION_NOINSTALL)
|
||||||
set (project_SHARE_DIR ${PROJECT_SOURCE_DIR}/share)
|
set (project_SHARE_DIR ${PROJECT_SOURCE_DIR}/share)
|
||||||
|
@ -68,14 +65,12 @@ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Activity tracker")
|
||||||
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
||||||
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
||||||
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||||
set (CPACK_PACKAGE_VERSION ${project_VERSION})
|
|
||||||
set (CPACK_GENERATOR "TGZ;ZIP")
|
set (CPACK_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_PACKAGE_FILE_NAME
|
set (CPACK_PACKAGE_FILE_NAME
|
||||||
"${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
"${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
|
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
||||||
set (CPACK_SOURCE_IGNORE_FILES "/build;/\\\\.git")
|
set (CPACK_SOURCE_IGNORE_FILES "/build;/\\\\.git")
|
||||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
|
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
|
||||||
|
|
||||||
include (CPack)
|
include (CPack)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#define PROJECT_NAME "@CMAKE_PROJECT_NAME@"
|
#define PROJECT_NAME "@PROJECT_NAME@"
|
||||||
#define PROJECT_VERSION "@project_VERSION@"
|
#define PROJECT_VERSION "@PROJECT_VERSION@"
|
||||||
#define SHARE_DIR "@project_SHARE_DIR@"
|
#define SHARE_DIR "@project_SHARE_DIR@"
|
||||||
|
|
|
@ -4,8 +4,8 @@ add_project_arguments(['--vapidir', meson.current_source_dir()],
|
||||||
language: 'vala')
|
language: 'vala')
|
||||||
|
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
conf.set('CMAKE_PROJECT_NAME', meson.project_name())
|
conf.set('PROJECT_NAME', meson.project_name())
|
||||||
conf.set('project_VERSION', meson.project_version())
|
conf.set('PROJECT_VERSION', meson.project_version())
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'config.h.in',
|
input : 'config.h.in',
|
||||||
output : 'config.h',
|
output : 'config.h',
|
||||||
|
|
Loading…
Reference in New Issue