Blame third-party/CMakeLists.txt

Packit 1fb8d4
# Third-Party Extensions
Packit 1fb8d4
#
Packit 1fb8d4
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit 1fb8d4
#
Packit 1fb8d4
# Licensed under the Apache License, Version 2.0 (the "License");
Packit 1fb8d4
# you may not use this file except in compliance with the License.
Packit 1fb8d4
# You may obtain a copy of the License at
Packit 1fb8d4
#
Packit 1fb8d4
#     http://www.apache.org/licenses/LICENSE-2.0
Packit 1fb8d4
#
Packit 1fb8d4
# Unless required by applicable law or agreed to in writing, software
Packit 1fb8d4
# distributed under the License is distributed on an "AS IS" BASIS,
Packit 1fb8d4
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 1fb8d4
# See the License for the specific language governing permissions and
Packit 1fb8d4
# limitations under the License.
Packit 1fb8d4
Packit 1fb8d4
# The third-party directory is meant for third-party components to be built
Packit 1fb8d4
# as part of the main FreeRDP build system, making separate maintenance easier.
Packit 1fb8d4
# Subdirectories of the third-party directory are ignored by git, but are
Packit 1fb8d4
# automatically included by CMake when the -DWITH_THIRD_PARTY=on option is used.
Packit 1fb8d4
Packit 1fb8d4
file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
Packit 1fb8d4
Packit 1fb8d4
foreach(dir ${all_valid_subdirs})
Packit 1fb8d4
	if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt")
Packit 1fb8d4
		string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir})
Packit 1fb8d4
		message(STATUS "Adding third-party component ${dir_trimmed}")
Packit 1fb8d4
		add_subdirectory(${dir_trimmed})
Packit 1fb8d4
	endif()
Packit 1fb8d4
endforeach(dir)
Packit 1fb8d4
Packit 1fb8d4
set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)