mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
use VERSION file for project settings and lib output
This commit is contained in:
parent
b603e04d9e
commit
4cc384ecac
1 changed files with 8 additions and 9 deletions
|
@ -3,20 +3,17 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(chibi-scheme)
|
|
||||||
|
|
||||||
include(CheckIncludeFile)
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION version)
|
||||||
|
string(STRIP ${version} version)
|
||||||
#
|
|
||||||
# Version setting
|
|
||||||
#
|
|
||||||
|
|
||||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/RELEASE release)
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/RELEASE release)
|
||||||
string(STRIP ${release} release)
|
string(STRIP ${release} release)
|
||||||
|
|
||||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION rawversion)
|
project(chibi-scheme LANGUAGES C VERSION ${version}
|
||||||
string(STRIP ${rawversion} rawversion)
|
DESCRIPTION "Chibi-Scheme: minimal r7rs implementation, release: ${release}")
|
||||||
set(version "${rawversion}-cmake")
|
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
|
@ -178,6 +175,8 @@ add_library(libchibi-scheme
|
||||||
|
|
||||||
set_target_properties(libchibi-scheme
|
set_target_properties(libchibi-scheme
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
|
||||||
|
VERSION ${CMAKE_PROJECT_VERSION}
|
||||||
COMPILE_DEFINITIONS "SEXP_USE_STATIC_LIBS=1")
|
COMPILE_DEFINITIONS "SEXP_USE_STATIC_LIBS=1")
|
||||||
|
|
||||||
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue