Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Licensed to the Apache Software Foundation (ASF) under one or more
- # contributor license agreements. See the NOTICE file distributed with
- # this work for additional information regarding copyright ownership.
- # The ASF licenses this file to You under the Apache License, Version 2.0
- # (the "License"); you may not use this file except in compliance with
- # the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #
- CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
- PROJECT(mod_jk C)
- IF(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/lib/libhttpd.lib)
- MESSAGE(FATAL_ERROR "libhttpd.lib was not found in prefix ${CMAKE_INSTALL_PREFIX}")
- ENDIF()
- # Select APR trunk (libapr-2.lib) if it exists in PREFIX/lib; otherwise, select
- # APR 1.x + APR-util 1.x
- #
- IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib")
- SET(apr_libraries
- ${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib)
- ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib")
- SET(apr_libraries
- ${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib
- ${CMAKE_INSTALL_PREFIX}/lib/libaprutil-1.lib)
- ELSE()
- MESSAGE(FATAL_ERROR "APR libraries were not found in prefix ${CMAKE_INSTALL_PREFIX}")
- ENDIF()
- IF(EXISTS ${CMAKE_INSTALL_PREFIX}/lib/pcre2-8.lib)
- SET(pcre_libraries
- ${CMAKE_INSTALL_PREFIX}/lib/pcre2-8.lib)
- ELSE()
- MESSAGE(FATAL_ERROR "pcre2-8.lib was not found in prefix ${CMAKE_INSTALL_PREFIX}")
- ENDIF()
- # Extra libraries.
- #
- SET(extra_libraries ws2_32.lib)
- # Miscellaneous options.
- #
- OPTION(INSTALL_PDB "Install .pdb file (if generated)" OFF)
- SET(mod_jk_sources
- native/common/ap_snprintf.c
- native/common/jk_ajp12_worker.c
- native/common/jk_ajp13.c
- native/common/jk_ajp13_worker.c
- native/common/jk_ajp14.c
- native/common/jk_ajp14_worker.c
- native/common/jk_ajp_common.c
- native/common/jk_connect.c
- native/common/jk_context.c
- native/common/jk_lb_worker.c
- native/common/jk_map.c
- native/common/jk_md5.c
- native/common/jk_msg_buff.c
- native/common/jk_pool.c
- native/common/jk_shm.c
- native/common/jk_sockbuf.c
- native/common/jk_status.c
- native/common/jk_uri_worker_map.c
- native/common/jk_url.c
- native/common/jk_util.c
- native/common/jk_worker.c
- native/apache-2.0/mod_jk.c
- )
- INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include native/common)
- ADD_LIBRARY(mod_jk SHARED ${mod_jk_sources})
- SET_TARGET_PROPERTIES(mod_jk PROPERTIES SUFFIX .so)
- TARGET_LINK_LIBRARIES(mod_jk ${CMAKE_INSTALL_PREFIX}/lib/libhttpd.lib
- ${apr_libraries} ${pcre_libraries} ${extra_libraries})
- INSTALL(TARGETS mod_jk RUNTIME DESTINATION modules)
- IF(INSTALL_PDB)
- INSTALL(FILES ${CMAKE_BINARY_DIR}/mod_jk.pdb DESTINATION modules
- CONFIGURATIONS RelWithDebInfo Debug)
- ENDIF()
Add Comment
Please, Sign In to add comment