use sensible default module paths for Linux/Unix

This commit is contained in:
Lukas Böger 2021-05-31 10:35:49 +01:00
parent 0bade8de2f
commit 17ffa4b36c

View file

@ -15,6 +15,7 @@ project(chibi-scheme LANGUAGES C VERSION ${version}
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckSymbolExists) include(CheckSymbolExists)
include(GNUInstallDirs)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@ -339,18 +340,6 @@ bless_chibi_scheme_executable(chibi-scheme)
# Generate "chibi/install.h" # Generate "chibi/install.h"
# #
if(CYGWIN OR WIN32)
set(thePrefix "bin")
else()
set(thePrefix "lib")
endif()
if(WIN32)
set(pathsep "\\;")
else()
set(pathsep ":")
endif()
if(WIN32) if(WIN32)
set(platform "windows") set(platform "windows")
elseif(CYGWIN) elseif(CYGWIN)
@ -370,10 +359,11 @@ else()
endif() endif()
set(default_module_path string(JOIN ":" default_module_path
"" ${CMAKE_INSTALL_FULL_DATAROOTDIR}/chibi
#"${CMAKE_INSTALL_PREFIX}/${thePrefix}${pathsep}${CMAKE_INSTALL_PREFIX}/bin" ${CMAKE_INSTALL_FULL_LIBDIR}/chibi
) ${CMAKE_INSTALL_FULL_DATAROOTDIR}/snow
${CMAKE_INSTALL_FULL_LIBDIR}/snow)
configure_file(include/chibi/install.h.in include/chibi/install.h) configure_file(include/chibi/install.h.in include/chibi/install.h)