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: sqlite3embed
  17. #####################################################
  18. # Description:
  19. # ------------
  20. # Cmake Input File for sqlite3embed
  21. #####################################################
  22. project(sqlite3embed)
  23. if(SQLITE3EMBED)
  24. ADD_PLUGIN(sqlite3embed PACKAGES SQLITE3)
  25. if(MAKE_SQLITE3EMBED)
  26. set(
  27. SRCS
  28. sqlite3.cpp)
  29. include_directories(
  30. ./../../system/include
  31. ./../../rtl/eclrtl
  32. ./../../rtl/include
  33. ./../../rtl/nbcd
  34. ./../../common/deftype
  35. ./../../system/jlib
  36. ${SQLITE3_INCLUDE_DIR})
  37. add_definitions(-D_USRDLL -DSQLITE3_EXPORTS)
  38. HPCC_ADD_LIBRARY(sqlite3embed SHARED ${SRCS})
  39. if(${CMAKE_VERSION} VERSION_LESS "2.8.9")
  40. message(WARNING "Cannot set NO_SONAME. shlibdeps will give warnings when package is installed")
  41. elseif(NOT APPLE)
  42. set_target_properties(sqlite3embed PROPERTIES NO_SONAME 1)
  43. endif()
  44. install(
  45. TARGETS sqlite3embed
  46. DESTINATION plugins)
  47. target_link_libraries(
  48. sqlite3embed
  49. ${SQLITE3_LIBRARIES})
  50. target_link_libraries(
  51. sqlite3embed
  52. eclrtl
  53. jlib)
  54. endif()
  55. endif()
  56. if(PLATFORM OR CLIENTTOOLS_ONLY)
  57. install(
  58. FILES ${CMAKE_CURRENT_SOURCE_DIR}/sqlite3.ecllib
  59. DESTINATION plugins
  60. COMPONENT Runtime)
  61. endif()