Skip to content

Commit 2816594

Browse files
authored
Merge pull request #50 from florsap/macos-compilation
Macos compilation
2 parents 6a1bb63 + bbe84b3 commit 2816594

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/cmake.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CMake
22

3-
on: [push, pull_request]
3+
on: [push, pull_request, workflow_dispatch]
44

55
env:
66
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -16,8 +16,11 @@ jobs:
1616

1717
steps:
1818
- name: Install gtest
19-
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
20-
19+
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
20+
21+
- name: Install odbc
22+
run: sudo apt install -y unixodbc-dev
23+
2124
- uses: actions/checkout@v2
2225

2326
- name: Create Build Environment

src/odbc/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ TARGET_COMPILE_DEFINITIONS(odbccpp_static
5656
PUBLIC
5757
ODBC_STATIC
5858
)
59+
60+
TARGET_INCLUDE_DIRECTORIES(odbccpp_static
61+
PUBLIC
62+
${ODBC_INCLUDE_DIR}
63+
)
64+
5965
SET_PROPERTY(TARGET odbccpp_static PROPERTY POSITION_INDEPENDENT_CODE ON)
6066

6167
# Shared library
@@ -73,6 +79,11 @@ TARGET_LINK_LIBRARIES(odbccpp
7379
${ODBC_LIBRARIES}
7480
)
7581

82+
TARGET_INCLUDE_DIRECTORIES(odbccpp
83+
PUBLIC
84+
${ODBC_INCLUDE_DIR}
85+
)
86+
7687
SET_PROPERTY(TARGET odbccpp PROPERTY public_headers ${public_headers})
7788

7889
# Installation

0 commit comments

Comments
 (0)