@@ -44,10 +44,7 @@ option(BUILD_TESTS "Build tests" OFF)
4444option (BUILD_SHARED_LIBS "Build shared libraries" ON )
4545
4646# Platform-specific configuration
47- if (WIN32 )
48- # Windows uses odbc32
49- set (ODBC_LIBRARIES odbc32)
50- elseif (APPLE )
47+ if (APPLE )
5148 # macOS: Prefer Homebrew paths on Apple Silicon
5249 if (NOT CMAKE_PREFIX_PATH AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" )
5350 list (PREPEND CMAKE_PREFIX_PATH "/opt/homebrew" )
@@ -185,28 +182,15 @@ set_target_properties(databricks_sdk PROPERTIES
185182 SOVERSION ${PROJECT_VERSION_MAJOR }
186183)
187184
188- # Set RPATH for finding ODBC libraries at runtime (Unix/Linux/macOS only)
189- if (NOT WIN32 )
190- # Use RPATH to find shared libraries relative to executable
191- set_target_properties (databricks_sdk PROPERTIES
192- BUILD_RPATH "${ODBC_LIBRARY_DIR} ;/usr/local/lib;/opt/homebrew/lib;/opt/local/lib"
193- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX } /lib;/usr/local/lib;/opt/homebrew/lib;/opt/local/lib"
194- INSTALL_RPATH_USE_LINK_PATH TRUE
195- )
196- endif ()
185+ # Set RPATH for finding ODBC libraries at runtime
186+ set_target_properties (databricks_sdk PROPERTIES
187+ BUILD_RPATH "${ODBC_LIBRARY_DIR} ;/usr/local/lib;/opt/homebrew/lib;/opt/local/lib"
188+ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX } /lib;/usr/local/lib;/opt/homebrew/lib;/opt/local/lib"
189+ INSTALL_RPATH_USE_LINK_PATH TRUE
190+ )
197191
198- # Compiler warnings and definitions
199- if (MSVC )
200- target_compile_options (databricks_sdk PRIVATE /W4 )
201- target_compile_definitions (databricks_sdk
202- PRIVATE
203- NOMINMAX # Prevent min/max macros
204- NOGDI # Prevent GDI macros (including ERROR)
205- WIN32_LEAN_AND_MEAN # Reduce Windows header bloat
206- )
207- else ()
208- target_compile_options (databricks_sdk PRIVATE -Wall -Wextra -Wpedantic )
209- endif ()
192+ # Compiler warnings
193+ target_compile_options (databricks_sdk PRIVATE -Wall -Wextra -Wpedantic )
210194
211195# Examples
212196if (BUILD_EXAMPLES)
0 commit comments