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 (CheckCXXSymbolExists )
3131include (CMakeDependentOption)
32+ include (CMakePushCheckState)
3233include (FeatureSummary)
3334
3435option (PHP_EXT_PDO_FIREBIRD "Enable the pdo_firebird extension" )
@@ -92,13 +93,16 @@ target_link_libraries(php_ext_pdo_firebird PRIVATE Firebird::Firebird)
9293
9394# Sanity check.
9495if (TARGET Firebird::Firebird)
95- check_library_exists(
96- Firebird::Firebird
97- fb_get_master_interface
98- ""
99- _php_ext_pdo_firebird_sanity_check
100- )
101- if (NOT _php_ext_pdo_firebird_sanity_check)
96+ cmake_push_check_state(RESET)
97+ set (CMAKE_REQUIRED_LIBRARIES Firebird::Firebird)
98+ check_cxx_symbol_exists(
99+ Firebird::fb_get_master_interface
100+ firebird/Interface .h
101+ _PHP_EXT_PDO_FIREBIRD_SANITY_CHECK
102+ )
103+ cmake_pop_check_state()
104+
105+ if (NOT _PHP_EXT_PDO_FIREBIRD_SANITY_CHECK)
102106 message (
103107 FATAL_ERROR
104108 "Firebird sanity check failed: 'fb_get_master_interface()' not found."
You can’t perform that action at this time.
0 commit comments