CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ################################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2012 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: py3embed
  17. #####################################################
  18. # Description:
  19. # ------------
  20. # Cmake Input File for py3embed
  21. #####################################################
  22. project(py3embed)
  23. find_package(Python3 3.6 REQUIRED COMPONENTS Interpreter Development)
  24. set(
  25. SRCS
  26. py3embed.cpp)
  27. include_directories(
  28. "${Python3_INCLUDE_DIRS}"
  29. ./../../system/include
  30. ./../../rtl/eclrtl
  31. ./../../rtl/include
  32. ./../../rtl/nbcd
  33. ./../../common/deftype
  34. ./../../common/thorhelper
  35. ./../../dali/base
  36. ./../../system/mp
  37. ./../../roxie/roxiemem
  38. ./../../system/jlib)
  39. add_definitions(-D_USRDLL -DPY3EMBED_EXPORTS)
  40. HPCC_ADD_LIBRARY(py3embed 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. elseif(NOT APPLE)
  44. set_target_properties(py3embed PROPERTIES NO_SONAME 1)
  45. endif()
  46. if (CONTAINERIZED)
  47. install(
  48. TARGETS py3embed
  49. DESTINATION plugins)
  50. else()
  51. install(
  52. TARGETS py3embed
  53. DESTINATION versioned/python3)
  54. endif()
  55. target_link_libraries(
  56. py3embed
  57. eclrtl
  58. roxiemem
  59. jlib
  60. Python3::Python
  61. )
  62. if(PLATFORM OR CLIENTTOOLS_ONLY)
  63. install(
  64. FILES ${CMAKE_CURRENT_SOURCE_DIR}/python3.ecllib
  65. DESTINATION plugins
  66. COMPONENT Runtime)
  67. endif()