-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CMake #13
Update CMake #13
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Updating configure.ac so that version.text.in works for both, and also suggest that we use ChangeLog instead of doc/version.texi as the source of the date? --- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,18 @@
AC_INIT(binio,1.5,[dn.tlp@gmx.net],libbinio)
AC_CONFIG_SRCDIR(src/binio.cpp)
-AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile src/binio.h libbinio.pc])
+AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile src/binio.h libbinio.pc doc/version.texi])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
#AM_DISABLE_SHARED
AM_PROG_LIBTOOL
AC_LANG(C++)
+AC_SUBST(at, "@")
+AC_SUBST(libbinio_VERSION, [$VERSION])
+timestamp=`stat --format=%Y ChangeLog`
+AC_SUBST(LIBBINIO_TEXI_UPDATED, [`date -u --date=@$timestamp +"%d %B %Y"`])
+AC_SUBST(LIBBINIO_TEXI_MONTH_UPDATED, [`date -u --date=@$timestamp +"%B %Y"`])
+
# Check for a sane C/C++ build environment.
AC_PROG_MAKE_SET
AC_PROG_INSTALL |
Second minor issue, following https://alexreinking.com/blog/building-a-dual-shared-and-static-library-with-cmake.html , the dual shared/static install fails, they both overwrite the same file cmake config file during install with oposite static and shared information
|
This is fixed with the commit I added on your branch |
CI however fails with
|
Specify the C++ language version. Don't let MSVC get misled by user code pages. Get the CMake build to behave more like the automake build.
acb1a9f
to
42269a0
Compare
-- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-static-targets.cmake -- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-static-targets-release.cmake instead of -- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-shared-targets.cmake -- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-shared-targets-release.cmake if invoked like this: $ cmake -G Ninja -S . -B build-shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=Release $ cmake --build build-shared $ cmake --install build-shared --prefix _install
Enhance the CMake build to support:
Two GitHub workflows are supplied to test the CMake-based build. One does a normal build and the other runs a CodeQL analysis. Both workflows run for Windows, Linux, and macOS.