File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -495,9 +495,20 @@ elseif(MYSQL_CONFIG_EXECUTABLE)
495
495
"\" ${MYSQL_CONFIG_EXECUTABLE} \" " )
496
496
endif ()
497
497
498
- if (NOT EXISTS "${MYSQL_INCLUDE_DIR} /mysql.h" )
498
+ set (_found_mysql_h )
499
+ foreach (_incdir ${MYSQL_INCLUDE_DIR} )
500
+ if (NOT EXISTS "${_incdir} " )
501
+ message (FATAL_ERROR "Could not find the directory \" ${_incdir} \" "
502
+ "from running \" ${MYSQL_CONFIG_EXECUTABLE} \" " )
503
+ endif ()
504
+ if (EXISTS "${_incdir} /mysql.h" )
505
+ set (_found_mysql_h 1 )
506
+ endif ()
507
+ endforeach ()
508
+
509
+ if (NOT _found_mysql_h )
499
510
message (FATAL_ERROR "Could not find \" mysql.h\" in \" ${MYSQL_INCLUDE_DIR} \" "
500
- "found from running \" ${MYSQL_CONFIG_EXECUTABLE} \" " )
511
+ "from running \" ${MYSQL_CONFIG_EXECUTABLE} \" " )
501
512
endif ()
502
513
503
514
else ()
@@ -583,10 +594,12 @@ elseif(MYSQL_CONFIG_EXECUTABLE)
583
594
"\" ${MYSQL_CONFIG_EXECUTABLE} \" " )
584
595
endif ()
585
596
586
- if (NOT EXISTS "${MYSQL_LIB_DIR} " )
587
- message (FATAL_ERROR "Could not find the directory \" ${MYSQL_LIB_DIR} \" "
588
- "found from running \" ${MYSQL_CONFIG_EXECUTABLE} \" " )
589
- endif ()
597
+ foreach (_libdir ${MYSQL_LIB_DIR} )
598
+ if (NOT EXISTS "${_libdir} " )
599
+ message (FATAL_ERROR "Could not find the directory \" ${_libdir} \" "
600
+ "from running \" ${MYSQL_CONFIG_EXECUTABLE} \" " )
601
+ endif ()
602
+ endforeach ()
590
603
591
604
# We have the assumed MYSQL_LIB_DIR. The output from "mysql_config"
592
605
# might not be correct for static libraries, so we might need to
You can’t perform that action at this time.
0 commit comments