Hello, Nicholas!
Monday March 04 2024 22:28, from Nicholas Boel -> Nil Alexandrov:
For the record, I'm working on Smapinntpd a bit. It requires smapi
which, in turn, will require huskylib. I installed it fairly easy with some tinkering, because I have all of the husky project already
installed and in use on my system, but for someone downloading the
program and trying to install it without the husky project already installed will be confusing. I'm trying to figure out the easiest way
to do so, so I can either write up more current installation
instructions, or somehow provide these with the package so one can
just install everything in one shot.
I personally prefer cmake, not low-level make files. I use smapi+huskylib in my pet project. I just fetch and compile both smapi and huskylib from my main CMakeLists.txt. I also replace their CMakeLists.txt and apply my patch, otherwise I am having issue compiling for mingw64 and other fancy stuff.
# Import Husky libraries
include(FetchContent)
message(STATUS "Importing huskylib library from github")
FetchContent_Declare(
huskylib
GIT_REPOSITORY "
https://github.com/huskyproject/huskylib.git"
GIT_TAG d3c0c1c3b643d7fce45f82d6c8378802e85d9205
# Patch command will ru-run every cmake reload, so the patch should not return an error.
# This fix won't work in Windows environment.
PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/huskylib.patch" || true
)
FetchContent_Populate(huskylib)
# replace the cmake file
configure_file(CMakeLists_huskylib.txt ${huskylib_SOURCE_DIR}/CMakeLists.txt COPYONLY)
# generate the date file, content is not that important
file(WRITE ${huskylib_SOURCE_DIR}/cvsdate.h "char cvs_date[]=\"2024-01-01\";") # delete the version file which confuses the MacOSX12.sdk/usr/include/c++/v1/cstddef
file(REMOVE ${huskylib_SOURCE_DIR}/version) add_subdirectory(${huskylib_SOURCE_DIR} huskylib) target_compile_options(huskylib INTERFACE -Wno-register) target_compile_options(huskylib PRIVATE -Wfatal-errors -Wno-register)
message(STATUS "Importing smapi library from github")
FetchContent_Declare(
smapi
GIT_REPOSITORY "
https://github.com/huskyproject/smapi.git"
GIT_TAG c2fc9ecb0dd1ec8909e9e9709bfdd0031d5b9bf2
)
FetchContent_Populate(smapi)
# replace the cmake file
configure_file(CMakeLists_smapi.txt ${smapi_SOURCE_DIR}/CMakeLists.txt COPYONLY)
# generate the date file, content is not that important
file(WRITE ${smapi_SOURCE_DIR}/cvsdate.h "char cvs_date[]=\"2024-01-01\";")
# delete the version file which confuses the MacOSX12.sdk/usr/include/c++/v1/cstddef
file(REMOVE ${smapi_SOURCE_DIR}/version)
add_subdirectory(${smapi_SOURCE_DIR} smapi)
Best Regards,
Nil
--- GoldED+/LNX 1.1.5
* Origin: KC1GSH (1:16/101)