CMakeLists.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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(MYSQLEMBED)
  24. ADD_PLUGIN(mysqlembed PACKAGES MYSQL)
  25. if(MAKE_MYSQLEMBED)
  26. set(
  27. SRCS
  28. mysqlembed.cpp)
  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. add_definitions(-D_USRDLL -DMYSQLEMBED_EXPORTS)
  39. HPCC_ADD_LIBRARY(mysqlembed SHARED ${SRCS})
  40. if(${CMAKE_VERSION} VERSION_LESS "2.8.9")
  41. message(WARNING "Cannot set NO_SONAME. shlibdeps will give warnings when package is installed")
  42. elseif(NOT APPLE)
  43. set_target_properties(mysqlembed PROPERTIES NO_SONAME 1)
  44. endif()
  45. install(
  46. TARGETS mysqlembed
  47. DESTINATION plugins )
  48. target_link_libraries(
  49. mysqlembed
  50. ${MYSQL_LIBRARIES}
  51. eclrtl
  52. roxiemem
  53. jlib)
  54. endif()
  55. endif()
  56. if(PLATFORM OR CLIENTTOOLS_ONLY)
  57. install(
  58. FILES ${CMAKE_CURRENT_SOURCE_DIR}/mysql.ecllib
  59. DESTINATION plugins
  60. COMPONENT Runtime)
  61. endif()