Skip to content

Commit

Permalink
rock: build with cmake
Browse files Browse the repository at this point in the history
cmake allows more flexible setup, which is needed for automatic override
package build.
  • Loading branch information
DifferentialOrange committed Apr 19, 2023
1 parent 6ce9356 commit a9e66c0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ packpack
*.lua.c

packpack

build.luarocks
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Versioning supported.

### Changed

- Build rock with cmake.

## [3.2.0] - 2023-01-27
### Added

Expand Down
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(checks NONE)

## Install ####################################################################
###############################################################################

if(NOT DEFINED TARANTOOL_INSTALL_LUADIR)
set(TARANTOOL_INSTALL_LUADIR "${PROJECT_SOURCE_DIR}/.rocks/share/tarantool")
endif()

install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.lua
DESTINATION ${TARANTOOL_INSTALL_LUADIR}
)

install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}
DESTINATION ${TARANTOOL_INSTALL_LUADIR}
)
10 changes: 4 additions & 6 deletions checks-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ dependencies = {
}

build = {
type = 'builtin',
modules = {
['checks'] = 'checks.lua',
['checks.version'] = 'checks/version.lua',
}
type = 'cmake',
variables = {
TARANTOOL_INSTALL_LUADIR = '$(LUADIR)',
},
}

0 comments on commit a9e66c0

Please sign in to comment.