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_log_rotate 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()
- # Miscellaneous options.
- #
- OPTION(INSTALL_PDB "Install .pdb file (if generated)" OFF)
- SET(mod_log_rotate_sources
- src/mod_log_rotate.c
- )
- INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include)
- ADD_LIBRARY(mod_log_rotate SHARED ${mod_log_rotate_sources})
- SET_TARGET_PROPERTIES(mod_log_rotate PROPERTIES SUFFIX .so)
- TARGET_LINK_LIBRARIES(mod_log_rotate ${CMAKE_INSTALL_PREFIX}/lib/libhttpd.lib ${apr_libraries})
- INSTALL(TARGETS mod_log_rotate RUNTIME DESTINATION modules)
- IF(INSTALL_PDB)
- INSTALL(FILES ${CMAKE_BINARY_DIR}/mod_log_rotate.pdb DESTINATION modules
- CONFIGURATIONS RelWithDebInfo Debug)
- ENDIF()
Add Comment
Please, Sign In to add comment