2012-08-14 15:49:39 -04:00
|
|
|
# WinPR: Windows Portable Runtime
|
|
|
|
|
# winpr cmake build script
|
|
|
|
|
#
|
|
|
|
|
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
|
|
|
#
|
|
|
|
|
# Licensed 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.
|
|
|
|
|
|
2024-10-02 22:37:35 +02:00
|
|
|
cleaning_configure_file(config/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h)
|
|
|
|
|
cleaning_configure_file(config/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/build-config.h)
|
|
|
|
|
cleaning_configure_file(config/buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/buildflags.h)
|
|
|
|
|
cleaning_configure_file(config/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/config.h)
|
2022-02-16 10:08:00 +01:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
file(GLOB_RECURSE WINPR_PUBLIC_COMMON_HEADERS LIST_DIRECTORIES false "winpr/*.h")
|
2023-10-18 15:21:32 +02:00
|
|
|
|
|
|
|
|
set(WINPR_PUBLIC_TOOLS_HEADERS ${WINPR_PUBLIC_COMMON_HEADERS})
|
|
|
|
|
list(FILTER WINPR_PUBLIC_TOOLS_HEADERS INCLUDE REGEX ".*winpr/tools.*")
|
|
|
|
|
list(FILTER WINPR_PUBLIC_COMMON_HEADERS EXCLUDE REGEX ".*winpr/tools.*")
|
|
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
file(GLOB_RECURSE WINPR_PUBLIC_COMMON_BIN_HEADERS LIST_DIRECTORIES false "${CMAKE_CURRENT_BINARY_DIR}/*.h")
|
2023-10-18 15:21:32 +02:00
|
|
|
list(APPEND WINPR_PUBLIC_COMMON_HEADERS ${WINPR_PUBLIC_COMMON_BIN_HEADERS})
|
|
|
|
|
list(SORT WINPR_PUBLIC_COMMON_HEADERS)
|
|
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
set_property(TARGET winpr APPEND PROPERTY SOURCES ${WINPR_PUBLIC_COMMON_HEADERS})
|
2023-10-18 15:21:32 +02:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
if(WITH_WINPR_TOOLS)
|
|
|
|
|
set_property(TARGET winpr-tools APPEND PROPERTY SOURCES ${WINPR_PUBLIC_TOOLS_HEADERS})
|
2023-10-18 15:21:32 +02:00
|
|
|
endif()
|
|
|
|
|
|
2024-09-12 14:41:19 +02:00
|
|
|
add_library(winpr-headers INTERFACE)
|
2024-11-27 20:31:31 +01:00
|
|
|
target_sources(winpr-headers INTERFACE ${WINPR_PUBLIC_COMMON_HEADERS})
|
2024-09-12 14:41:19 +02:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${WINPR_INCLUDE_DIR} FILES_MATCHING PATTERN "*.h")
|
2015-03-30 17:50:47 +02:00
|
|
|
|
2024-11-27 20:31:31 +01:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION ${WINPR_INCLUDE_DIR} FILES_MATCHING PATTERN "*.h")
|