prefer configure_file over manual file(WRITE ...)

This commit is contained in:
Lukas Böger 2021-05-27 23:02:57 +01:00
parent 514d58264f
commit b0c0afcb73
2 changed files with 6 additions and 9 deletions

View file

@ -260,15 +260,7 @@ set(default_module_path
#"${CMAKE_INSTALL_PREFIX}/${thePrefix}${pathsep}${CMAKE_INSTALL_PREFIX}/bin" #"${CMAKE_INSTALL_PREFIX}/${thePrefix}${pathsep}${CMAKE_INSTALL_PREFIX}/bin"
) )
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/chibi) configure_file(include/chibi/install.h.in include/chibi/install.h)
file(WRITE
${CMAKE_CURRENT_BINARY_DIR}/include/chibi/install.h
"#define sexp_so_extension \"${CMAKE_SHARED_LIBRARY_SUFFIX}\"
#define sexp_default_module_path \"${default_module_path}\"
#define sexp_platform \"${platform}\"
#define sexp_version \"\"
#define sexp_release_name \"${release}\"")
# #
# Testing # Testing

View file

@ -0,0 +1,5 @@
#define sexp_so_extension "@CMAKE_SHARED_LIBRARY_SUFFIX@"
#define sexp_default_module_path "@default_module_path@"
#define sexp_platform "@platform@"
#define sexp_version "@CMAKE_PROJECT_VERSION@"
#define sexp_release_name "@release@"