File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ project(
2727 LANGUAGES C
2828)
2929
30- include (CheckLibraryExists )
30+ include (CheckSymbolExists )
3131include (CMakeDependentOption)
32+ include (CMakePushCheckState)
3233include (FeatureSummary)
3334
3435option (PHP_EXT_PDO_FIREBIRD "Enable the pdo_firebird extension" )
@@ -85,13 +86,16 @@ target_link_libraries(php_ext_pdo_firebird PRIVATE Firebird::Firebird)
8586
8687# Sanity check.
8788if (TARGET Firebird::Firebird)
88- check_library_exists(
89- Firebird::Firebird
90- isc_detach_database
91- ""
92- _php_ext_pdo_firebird_sanity_check
93- )
94- if (NOT _php_ext_pdo_firebird_sanity_check)
89+ cmake_push_check_state(RESET)
90+ set (CMAKE_REQUIRED_LIBRARIES Firebird::Firebird)
91+ check_symbol_exists(
92+ isc_detach_database
93+ ibase.h
94+ _PHP_EXT_PDO_FIREBIRD_SANITY_CHECK
95+ )
96+ cmake_pop_check_state()
97+
98+ if (NOT _PHP_EXT_PDO_FIREBIRD_SANITY_CHECK)
9599 message (
96100 FATAL_ERROR
97101 "Firebird sanity check failed: 'isc_detach_database()' not found."
You can’t perform that action at this time.
0 commit comments