You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
1.1 KiB

  1. Find_Library ( MARIADB_LIBRARY
  2. NAMES mariadb mysql
  3. PATH_SUFFIXES mariadb )
  4. Find_File ( MARIADB_INCLUDE_DIR
  5. NAMES mysql.h
  6. PATH_SUFFIXES mariadb )
  7. Get_Filename_Component ( MARIADB_INCLUDE_DIR
  8. ${MARIADB_INCLUDE_DIR}
  9. DIRECTORY )
  10. Include ( FindPackageHandleStandardArgs )
  11. Find_Package_Handle_Standard_Args ( mariadb DEFAULT_MSG
  12. MARIADB_LIBRARY
  13. MARIADB_INCLUDE_DIR )
  14. Mark_As_Advanced ( MARIADB_LIBRARY
  15. MARIADB_LIBRARIES )
  16. If ( MARIADB_FOUND )
  17. Set ( MARIADB_LIBRARIES ${MARIADB_LIBRARY} )
  18. Set ( MARIADB_INCLUDE_DIRS ${MARIADB_INCLUDE_DIR} )
  19. If ( NOT TARGET mariadb )
  20. Add_Library ( mariadb UNKNOWN IMPORTED )
  21. Set_Property ( TARGET mariadb
  22. PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MARIADB_INCLUDE_DIRS}" )
  23. Set_Property ( TARGET mariadb
  24. APPEND
  25. PROPERTY IMPORTED_LOCATION "${MARIADB_LIBRARY}")
  26. EndIf ( )
  27. EndIf ( )