tangentia

CMakeLists - tomcat-connectors-1.2.50-src.txt

Dec 31st, 2025 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 3.06 KB | None | 0 0
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements.  See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License.  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. CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
  17.  
  18. PROJECT(mod_jk C)
  19.  
  20. IF(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/lib/libhttpd.lib)
  21.   MESSAGE(FATAL_ERROR "libhttpd.lib was not found in prefix ${CMAKE_INSTALL_PREFIX}")
  22. ENDIF()
  23.  
  24. # Select APR trunk (libapr-2.lib) if it exists in PREFIX/lib; otherwise, select
  25. # APR 1.x + APR-util 1.x
  26. #
  27. IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib")
  28.   SET(apr_libraries
  29.     ${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib)
  30. ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib")
  31.   SET(apr_libraries
  32.     ${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib
  33.     ${CMAKE_INSTALL_PREFIX}/lib/libaprutil-1.lib)
  34. ELSE()
  35.   MESSAGE(FATAL_ERROR "APR libraries were not found in prefix ${CMAKE_INSTALL_PREFIX}")
  36. ENDIF()
  37.  
  38. IF(EXISTS ${CMAKE_INSTALL_PREFIX}/lib/pcre2-8.lib)
  39.   SET(pcre_libraries
  40.       ${CMAKE_INSTALL_PREFIX}/lib/pcre2-8.lib)
  41. ELSE()
  42.   MESSAGE(FATAL_ERROR "pcre2-8.lib was not found in prefix ${CMAKE_INSTALL_PREFIX}")
  43. ENDIF()
  44.  
  45. # Extra libraries.
  46. #
  47. SET(extra_libraries ws2_32.lib)
  48.  
  49. # Miscellaneous options.
  50. #
  51. OPTION(INSTALL_PDB "Install .pdb file (if generated)" OFF)
  52.  
  53. SET(mod_jk_sources
  54.     native/common/ap_snprintf.c
  55.     native/common/jk_ajp12_worker.c
  56.     native/common/jk_ajp13.c
  57.     native/common/jk_ajp13_worker.c
  58.     native/common/jk_ajp14.c
  59.     native/common/jk_ajp14_worker.c
  60.     native/common/jk_ajp_common.c
  61.     native/common/jk_connect.c
  62.     native/common/jk_context.c
  63.     native/common/jk_lb_worker.c
  64.     native/common/jk_map.c
  65.     native/common/jk_md5.c
  66.     native/common/jk_msg_buff.c
  67.     native/common/jk_pool.c
  68.     native/common/jk_shm.c
  69.     native/common/jk_sockbuf.c
  70.     native/common/jk_status.c
  71.     native/common/jk_uri_worker_map.c
  72.     native/common/jk_url.c
  73.     native/common/jk_util.c
  74.     native/common/jk_worker.c
  75.     native/apache-2.0/mod_jk.c
  76. )
  77.  
  78. INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include native/common)
  79. ADD_LIBRARY(mod_jk SHARED ${mod_jk_sources})
  80.  
  81. SET_TARGET_PROPERTIES(mod_jk PROPERTIES SUFFIX .so)
  82. TARGET_LINK_LIBRARIES(mod_jk ${CMAKE_INSTALL_PREFIX}/lib/libhttpd.lib
  83.   ${apr_libraries} ${pcre_libraries} ${extra_libraries})
  84.  
  85. INSTALL(TARGETS mod_jk RUNTIME DESTINATION modules)
  86.  
  87. IF(INSTALL_PDB)
  88.   INSTALL(FILES ${CMAKE_BINARY_DIR}/mod_jk.pdb DESTINATION modules
  89.           CONFIGURATIONS RelWithDebInfo Debug)
  90. ENDIF()
  91.  
Tags: cmake
Add Comment
Please, Sign In to add comment