CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ################################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2013 HPCC Systems.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ################################################################################
  16. # Component: mysqlembed
  17. #####################################################
  18. # Description:
  19. # ------------
  20. # Cmake Input File for mysqlembed
  21. #####################################################
  22. project( mysqlembed )
  23. if (USE_MYSQL)
  24. ADD_PLUGIN(mysqlembed PACKAGES MYSQL OPTION MAKE_MYSQLEMBED)
  25. if ( MAKE_MYSQLEMBED )
  26. set ( SRCS
  27. mysqlembed.cpp
  28. )
  29. include_directories (
  30. ./../../system/include
  31. ./../../rtl/eclrtl
  32. ./../../roxie/roxiemem
  33. ./../../rtl/include
  34. ./../../rtl/nbcd
  35. ./../../common/deftype
  36. ./../../system/jlib
  37. ${MYSQL_INCLUDE_DIR}
  38. )
  39. ADD_DEFINITIONS( -D_USRDLL -DMYSQLEMBED_EXPORTS )
  40. HPCC_ADD_LIBRARY( mysqlembed SHARED ${SRCS} )
  41. if (${CMAKE_VERSION} VERSION_LESS "2.8.9")
  42. message("WARNING: Cannot set NO_SONAME. shlibdeps will give warnings when package is installed")
  43. else()
  44. set_target_properties( mysqlembed PROPERTIES NO_SONAME 1 )
  45. endif()
  46. install ( TARGETS mysqlembed DESTINATION plugins )
  47. target_link_libraries ( mysqlembed
  48. ${MYSQL_LIBRARIES}
  49. eclrtl
  50. roxiemem
  51. jlib
  52. )
  53. endif()
  54. endif()
  55. # Even if not making the MySQL plugin, we want to install the header
  56. install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/mysql.ecllib DESTINATION plugins COMPONENT Runtime)