From 51594d45c43c87574074e2172d199981e233c8e0 Mon Sep 17 00:00:00 2001 From: Florian Schimmel Date: Thu, 12 Feb 2026 14:15:04 +0100 Subject: [PATCH 1/3] Add includes explicitly for compilation on MacOS --- src/odbc/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/odbc/CMakeLists.txt b/src/odbc/CMakeLists.txt index 34a7453..f92ac0b 100644 --- a/src/odbc/CMakeLists.txt +++ b/src/odbc/CMakeLists.txt @@ -56,6 +56,12 @@ TARGET_COMPILE_DEFINITIONS(odbccpp_static PUBLIC ODBC_STATIC ) + +target_include_directories(odbccpp_static + PUBLIC + ${ODBC_INCLUDE_DIR} +) + SET_PROPERTY(TARGET odbccpp_static PROPERTY POSITION_INDEPENDENT_CODE ON) # Shared library @@ -73,6 +79,11 @@ TARGET_LINK_LIBRARIES(odbccpp ${ODBC_LIBRARIES} ) +target_include_directories(odbccpp + PUBLIC + ${ODBC_INCLUDE_DIR} +) + SET_PROPERTY(TARGET odbccpp PROPERTY public_headers ${public_headers}) # Installation From a222b0e971a95a61b9cec2e64286dabdaa6991ea Mon Sep 17 00:00:00 2001 From: Florian Schimmel Date: Thu, 12 Feb 2026 14:34:10 +0100 Subject: [PATCH 2/3] Fix workflow --- .github/workflows/cmake.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 15b21c5..804d79d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,6 +1,6 @@ name: CMake -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -16,8 +16,11 @@ jobs: steps: - name: Install gtest - run: cd ~ && git clone https://github.com/google/googletest.git && cd googletest && git checkout -b release-1.10.0 tags/release-1.10.0 && mkdir build && cd build && cmake .. && make && sudo make install - + run: cd ~ && git clone https://github.com/google/googletest.git && cd googletest && git checkout -b v1.17.0 tags/v1.17.0 && mkdir build && cd build && cmake .. && make && sudo make install + + - name: Install odbc + run: sudo apt install -y unixodbc-dev + - uses: actions/checkout@v2 - name: Create Build Environment From bbe84b38d50fb4708e8bcef89914c7f18327b4c8 Mon Sep 17 00:00:00 2001 From: Florian Schimmel Date: Fri, 13 Feb 2026 10:53:05 +0100 Subject: [PATCH 3/3] Make cmake commands uppercase. --- src/odbc/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/odbc/CMakeLists.txt b/src/odbc/CMakeLists.txt index f92ac0b..8c17b67 100644 --- a/src/odbc/CMakeLists.txt +++ b/src/odbc/CMakeLists.txt @@ -57,7 +57,7 @@ TARGET_COMPILE_DEFINITIONS(odbccpp_static ODBC_STATIC ) -target_include_directories(odbccpp_static +TARGET_INCLUDE_DIRECTORIES(odbccpp_static PUBLIC ${ODBC_INCLUDE_DIR} ) @@ -79,7 +79,7 @@ TARGET_LINK_LIBRARIES(odbccpp ${ODBC_LIBRARIES} ) -target_include_directories(odbccpp +TARGET_INCLUDE_DIRECTORIES(odbccpp PUBLIC ${ODBC_INCLUDE_DIR} )