mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
eliminate last global flag, move library definition
This commit is contained in:
parent
b0c0afcb73
commit
0f1dfad91c
1 changed files with 24 additions and 17 deletions
|
@ -74,12 +74,12 @@ else()
|
||||||
target_compile_definitions(libchibi-common INTERFACE SEXP_USE_DL=1)
|
target_compile_definitions(libchibi-common INTERFACE SEXP_USE_DL=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ${BUILD_SHARED_LIBS})
|
if(HAVE_STDINT_H)
|
||||||
add_definitions(-DSEXP_STATIC_LIBRARY=1)
|
target_compile_definitions(libchibi-common INTERFACE SEXP_USE_INTTYPES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_STDINT_H)
|
if(HAVE_NTP_GETTIME)
|
||||||
target_compile_definitions(libchibi-common INTERFACE SEXP_USE_INTTYPES=1)
|
target_compile_definitions(libchibi-common INTERFACE SEXP_USE_NTPGETTIME)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT HAVE_POLL_H)
|
if(NOT HAVE_POLL_H)
|
||||||
|
@ -123,9 +123,28 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate modules
|
# Core library
|
||||||
#
|
#
|
||||||
|
|
||||||
|
add_library(libchibi-scheme
|
||||||
|
${chibi-scheme-srcs})
|
||||||
|
|
||||||
|
target_link_libraries(libchibi-scheme
|
||||||
|
PUBLIC libchibi-common)
|
||||||
|
|
||||||
|
set_target_properties(libchibi-scheme
|
||||||
|
PROPERTIES
|
||||||
|
SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
|
||||||
|
VERSION ${CMAKE_PROJECT_VERSION})
|
||||||
|
|
||||||
|
if (NOT BUILD_SHARED_LIBS)
|
||||||
|
target_compile_definitions(libchibi-scheme PUBLIC SEXP_STATIC_LIBRARY=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate modules
|
||||||
|
#
|
||||||
# FIXME: Currently, it depends on GLOB thus we have to re-run CMake
|
# FIXME: Currently, it depends on GLOB thus we have to re-run CMake
|
||||||
# when we've gotten additional/removed library
|
# when we've gotten additional/removed library
|
||||||
|
|
||||||
|
@ -155,20 +174,8 @@ foreach(e ${stubs})
|
||||||
endforeach()
|
endforeach()
|
||||||
add_custom_target(chibi-scheme-stubs DEPENDS ${stubouts})
|
add_custom_target(chibi-scheme-stubs DEPENDS ${stubouts})
|
||||||
|
|
||||||
#
|
|
||||||
# Core library
|
|
||||||
#
|
|
||||||
|
|
||||||
add_library(libchibi-scheme
|
|
||||||
${chibi-scheme-srcs})
|
|
||||||
|
|
||||||
target_link_libraries(libchibi-scheme
|
|
||||||
PUBLIC libchibi-common)
|
|
||||||
|
|
||||||
set_target_properties(libchibi-scheme
|
|
||||||
PROPERTIES
|
|
||||||
SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
|
|
||||||
VERSION ${CMAKE_PROJECT_VERSION})
|
|
||||||
|
|
||||||
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
add_dependencies(libchibi-scheme chibi-scheme-stubs)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue