From bcf51371d24283951948470e5ab62ea89e725dbd Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 8 May 2025 20:21:44 +0200 Subject: Simplify CMake build config for test and demo programs Define platform specific library names as CMake variables so they can be used to build demo programs w/o platform specific instructions. This includes optional components (e.g. OpenGL) and the MSVC specific extra object library (call_main) and the fact that we build only one "monolithic" shared library with MSVC. Also, enable building FLTK Forms library in CI builds. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3803e9cb..81d55a758 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D FLTK_BACKEND_WAYLAND=OFF -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused" + run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D FLTK_BACKEND_WAYLAND=OFF -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D FLTK_BUILD_FORMS=ON -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused" - name: Build working-directory: ${{github.workspace}}/build @@ -72,7 +72,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override" + run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D FLTK_BUILD_FORMS=ON -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override" - name: Build working-directory: ${{github.workspace}}/build @@ -103,7 +103,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -DFLTK_BUILD_SHARED_LIBS:BOOL=ON -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override" + run: cmake $GITHUB_WORKSPACE -D CMAKE_BUILD_TYPE=$BUILD_TYPE -DFLTK_BUILD_SHARED_LIBS:BOOL=ON -D FLTK_BUILD_FORMS=ON -D CMAKE_CXX_STANDARD=11 -D CMAKE_CXX_EXTENSIONS=OFF -D CMAKE_C_FLAGS_INIT="-Wall -Wunused" -D CMAKE_CXX_FLAGS_INIT="-Wall -Wunused -Wsuggest-override" - name: Build working-directory: ${{github.workspace}}/build @@ -130,7 +130,7 @@ jobs: - name: Configure CMake working-directory: ${{github.workspace}}/build - run: cmake -D FLTK_USE_SYSTEM_LIBJPEG:BOOL=OFF -D FLTK_USE_SYSTEM_LIBPNG:BOOL=OFF -D FLTK_USE_SYSTEM_ZLIB:BOOL=OFF -DFLTK_BUILD_SHARED_LIBS:BOOL=ON .. + run: cmake -D FLTK_USE_SYSTEM_LIBJPEG:BOOL=OFF -D FLTK_USE_SYSTEM_LIBPNG:BOOL=OFF -D FLTK_USE_SYSTEM_ZLIB:BOOL=OFF -D FLTK_BUILD_FORMS=ON -DFLTK_BUILD_SHARED_LIBS:BOOL=ON .. - name: Build working-directory: ${{github.workspace}}/build -- cgit v1.2.3