Ignore:
Timestamp:
12/02/20 11:50:06 (4 years ago)
Author:
tbretz
Message:
It seems that MYSQL_LIBRARY gets defined even though it might be empty. Therefore, it has to be checked for emptiness and get totally undefined before MySQL is searched; added a policy availability check and an output for debug purposes of the used cmake version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r20007 r20008  
    55CMAKE_POLICY(SET CMP0043 NEW)
    66CMAKE_POLICY(SET CMP0048 NEW)
    7 CMAKE_POLICY(SET CMP0072 NEW)  # OpenGL vs OpenGLVND
     7IF(POLICY CMP0072)
     8    CMAKE_POLICY(SET CMP0072 NEW)  # OpenGL vs OpenGLVND
     9ENDIF()
    810
    911# Enable debug symbols by default
     
    2628#SET(CMAKE_VERBOSE_MAKEFILE ON)
    2729
     30MESSAGE(STATUS "CMake Version " ${CMAKE_VERSION})
    2831
    2932# *********************************
     
    213216INCLUDE(GetPrerequisites)
    214217
     218# Deprecated since version 3.16: Use file(GET_RUNTIME_DEPENDENCIES) instead.
     219
    215220FIND_PACKAGE(MySQL++ REQUIRED)
    216221
     
    218223        GET_PREREQUISITES(${MYSQLPP_LIBRARY} MYSQL_LIBRARY 0 0 "" "")
    219224        LIST(FILTER MYSQL_LIBRARY INCLUDE REGEX .*mysqlclient.*)
    220         IF (DEFINED MYSQL_LIBRARY)
     225        IF (MYSQL_LIB1RARY)
    221226                FIND_PACKAGE_MESSAGE(MysqlLib "MySQL++ links to ${MYSQL_LIBRARY}" "[${MYSQL_LIBRARY}]")
    222         ENDIF()
     227        ELSE()
     228                UNSET(MYSQL_LIBRARY)
     229        ENDIF()
    223230ENDIF()
    224231
Note: See TracChangeset for help on using the changeset viewer.