From 384af1d93b38efce73c5824f6ef12554ee5ef227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 14 Aug 2012 15:49:39 -0400 Subject: [PATCH] include: move winpr include directory inside winpr --- CMakeLists.txt | 9 ++- winpr/CMakeLists.txt | 50 ++------------- winpr/include/CMakeLists.txt | 20 ++++++ {include => winpr/include}/winpr/asn1.h | 0 {include => winpr/include}/winpr/bcrypt.h | 0 {include => winpr/include}/winpr/config.h.in | 0 {include => winpr/include}/winpr/crt.h | 0 {include => winpr/include}/winpr/dsparse.h | 0 {include => winpr/include}/winpr/handle.h | 0 {include => winpr/include}/winpr/heap.h | 0 {include => winpr/include}/winpr/library.h | 0 {include => winpr/include}/winpr/memory.h | 0 {include => winpr/include}/winpr/midl.h | 0 {include => winpr/include}/winpr/ndr.h | 0 {include => winpr/include}/winpr/ntlm.h | 0 {include => winpr/include}/winpr/print.h | 0 {include => winpr/include}/winpr/registry.h | 0 {include => winpr/include}/winpr/rpc.h | 0 {include => winpr/include}/winpr/sam.h | 0 {include => winpr/include}/winpr/security.h | 0 {include => winpr/include}/winpr/sspi.h | 0 {include => winpr/include}/winpr/sspicli.h | 0 {include => winpr/include}/winpr/stream.h | 0 {include => winpr/include}/winpr/string.h | 0 {include => winpr/include}/winpr/synch.h | 0 {include => winpr/include}/winpr/sysinfo.h | 0 {include => winpr/include}/winpr/tchar.h | 0 {include => winpr/include}/winpr/windows.h | 0 {include => winpr/include}/winpr/winpr.h | 0 {include => winpr/include}/winpr/wtypes.h | 0 winpr/libwinpr/CMakeLists.txt | 63 +++++++++++++++++++ winpr/{ => libwinpr}/asn1/CMakeLists.txt | 0 winpr/{ => libwinpr}/asn1/asn1.c | 0 winpr/{ => libwinpr}/bcrypt/CMakeLists.txt | 0 winpr/{ => libwinpr}/bcrypt/bcrypt.c | 0 winpr/{ => libwinpr}/crt/CMakeLists.txt | 0 winpr/{ => libwinpr}/crt/memory.c | 0 winpr/{ => libwinpr}/crt/string.c | 0 winpr/{ => libwinpr}/dsparse/CMakeLists.txt | 0 winpr/{ => libwinpr}/dsparse/dsparse.c | 0 winpr/{ => libwinpr}/handle/CMakeLists.txt | 0 winpr/{ => libwinpr}/handle/handle.c | 0 winpr/{ => libwinpr}/heap/CMakeLists.txt | 0 winpr/{ => libwinpr}/heap/heap.c | 0 winpr/{ => libwinpr}/library/CMakeLists.txt | 0 winpr/{ => libwinpr}/library/library.c | 0 winpr/{ => libwinpr}/registry/CMakeLists.txt | 0 winpr/{ => libwinpr}/registry/registry.c | 0 winpr/{ => libwinpr}/registry/registry_reg.c | 0 winpr/{ => libwinpr}/registry/registry_reg.h | 0 winpr/{ => libwinpr}/rpc/CMakeLists.txt | 0 winpr/{ => libwinpr}/rpc/midl.c | 0 winpr/{ => libwinpr}/rpc/ndr.c | 0 winpr/{ => libwinpr}/rpc/ndr_array.c | 0 winpr/{ => libwinpr}/rpc/ndr_array.h | 0 winpr/{ => libwinpr}/rpc/ndr_context.c | 0 winpr/{ => libwinpr}/rpc/ndr_context.h | 0 winpr/{ => libwinpr}/rpc/ndr_correlation.c | 0 winpr/{ => libwinpr}/rpc/ndr_correlation.h | 0 winpr/{ => libwinpr}/rpc/ndr_pointer.c | 0 winpr/{ => libwinpr}/rpc/ndr_pointer.h | 0 winpr/{ => libwinpr}/rpc/ndr_private.c | 0 winpr/{ => libwinpr}/rpc/ndr_private.h | 0 winpr/{ => libwinpr}/rpc/ndr_simple.c | 0 winpr/{ => libwinpr}/rpc/ndr_simple.h | 0 winpr/{ => libwinpr}/rpc/ndr_string.c | 0 winpr/{ => libwinpr}/rpc/ndr_string.h | 0 winpr/{ => libwinpr}/rpc/ndr_structure.c | 0 winpr/{ => libwinpr}/rpc/ndr_structure.h | 0 winpr/{ => libwinpr}/rpc/ndr_union.c | 0 winpr/{ => libwinpr}/rpc/ndr_union.h | 0 winpr/{ => libwinpr}/rpc/rpc.c | 0 winpr/{ => libwinpr}/sspi/CMakeLists.txt | 0 winpr/{ => libwinpr}/sspi/CredSSP/credssp.c | 0 winpr/{ => libwinpr}/sspi/CredSSP/credssp.h | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm.c | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm.h | 0 .../{ => libwinpr}/sspi/NTLM/ntlm_av_pairs.c | 0 .../{ => libwinpr}/sspi/NTLM/ntlm_av_pairs.h | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm_compute.c | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm_compute.h | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm_message.c | 0 winpr/{ => libwinpr}/sspi/NTLM/ntlm_message.h | 0 .../{ => libwinpr}/sspi/Negotiate/negotiate.c | 0 .../{ => libwinpr}/sspi/Negotiate/negotiate.h | 0 winpr/{ => libwinpr}/sspi/Schannel/schannel.c | 0 winpr/{ => libwinpr}/sspi/Schannel/schannel.h | 0 winpr/{ => libwinpr}/sspi/sspi.c | 0 winpr/{ => libwinpr}/sspi/sspi.h | 0 winpr/{ => libwinpr}/sspicli/CMakeLists.txt | 0 winpr/{ => libwinpr}/sspicli/sspicli.c | 0 winpr/{ => libwinpr}/synch/CMakeLists.txt | 0 winpr/{ => libwinpr}/synch/critical.c | 0 winpr/{ => libwinpr}/synch/event.c | 0 winpr/{ => libwinpr}/synch/mutex.c | 0 winpr/{ => libwinpr}/synch/semaphore.c | 0 winpr/{ => libwinpr}/synch/sleep.c | 0 winpr/{ => libwinpr}/sysinfo/CMakeLists.txt | 0 winpr/{ => libwinpr}/sysinfo/sysinfo.c | 0 winpr/{ => libwinpr}/utils/CMakeLists.txt | 0 winpr/{ => libwinpr}/utils/ntlm.c | 0 winpr/{ => libwinpr}/utils/print.c | 0 winpr/{ => libwinpr}/utils/sam.c | 0 winpr/{ => libwinpr}/utils/stream.c | 0 104 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 winpr/include/CMakeLists.txt rename {include => winpr/include}/winpr/asn1.h (100%) rename {include => winpr/include}/winpr/bcrypt.h (100%) rename {include => winpr/include}/winpr/config.h.in (100%) rename {include => winpr/include}/winpr/crt.h (100%) rename {include => winpr/include}/winpr/dsparse.h (100%) rename {include => winpr/include}/winpr/handle.h (100%) rename {include => winpr/include}/winpr/heap.h (100%) rename {include => winpr/include}/winpr/library.h (100%) rename {include => winpr/include}/winpr/memory.h (100%) rename {include => winpr/include}/winpr/midl.h (100%) rename {include => winpr/include}/winpr/ndr.h (100%) rename {include => winpr/include}/winpr/ntlm.h (100%) rename {include => winpr/include}/winpr/print.h (100%) rename {include => winpr/include}/winpr/registry.h (100%) rename {include => winpr/include}/winpr/rpc.h (100%) rename {include => winpr/include}/winpr/sam.h (100%) rename {include => winpr/include}/winpr/security.h (100%) rename {include => winpr/include}/winpr/sspi.h (100%) rename {include => winpr/include}/winpr/sspicli.h (100%) rename {include => winpr/include}/winpr/stream.h (100%) rename {include => winpr/include}/winpr/string.h (100%) rename {include => winpr/include}/winpr/synch.h (100%) rename {include => winpr/include}/winpr/sysinfo.h (100%) rename {include => winpr/include}/winpr/tchar.h (100%) rename {include => winpr/include}/winpr/windows.h (100%) rename {include => winpr/include}/winpr/winpr.h (100%) rename {include => winpr/include}/winpr/wtypes.h (100%) create mode 100644 winpr/libwinpr/CMakeLists.txt rename winpr/{ => libwinpr}/asn1/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/asn1/asn1.c (100%) rename winpr/{ => libwinpr}/bcrypt/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/bcrypt/bcrypt.c (100%) rename winpr/{ => libwinpr}/crt/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/crt/memory.c (100%) rename winpr/{ => libwinpr}/crt/string.c (100%) rename winpr/{ => libwinpr}/dsparse/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/dsparse/dsparse.c (100%) rename winpr/{ => libwinpr}/handle/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/handle/handle.c (100%) rename winpr/{ => libwinpr}/heap/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/heap/heap.c (100%) rename winpr/{ => libwinpr}/library/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/library/library.c (100%) rename winpr/{ => libwinpr}/registry/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/registry/registry.c (100%) rename winpr/{ => libwinpr}/registry/registry_reg.c (100%) rename winpr/{ => libwinpr}/registry/registry_reg.h (100%) rename winpr/{ => libwinpr}/rpc/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/rpc/midl.c (100%) rename winpr/{ => libwinpr}/rpc/ndr.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_array.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_array.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_context.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_context.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_correlation.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_correlation.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_pointer.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_pointer.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_private.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_private.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_simple.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_simple.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_string.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_string.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_structure.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_structure.h (100%) rename winpr/{ => libwinpr}/rpc/ndr_union.c (100%) rename winpr/{ => libwinpr}/rpc/ndr_union.h (100%) rename winpr/{ => libwinpr}/rpc/rpc.c (100%) rename winpr/{ => libwinpr}/sspi/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/sspi/CredSSP/credssp.c (100%) rename winpr/{ => libwinpr}/sspi/CredSSP/credssp.h (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm.c (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm.h (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_av_pairs.c (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_av_pairs.h (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_compute.c (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_compute.h (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_message.c (100%) rename winpr/{ => libwinpr}/sspi/NTLM/ntlm_message.h (100%) rename winpr/{ => libwinpr}/sspi/Negotiate/negotiate.c (100%) rename winpr/{ => libwinpr}/sspi/Negotiate/negotiate.h (100%) rename winpr/{ => libwinpr}/sspi/Schannel/schannel.c (100%) rename winpr/{ => libwinpr}/sspi/Schannel/schannel.h (100%) rename winpr/{ => libwinpr}/sspi/sspi.c (100%) rename winpr/{ => libwinpr}/sspi/sspi.h (100%) rename winpr/{ => libwinpr}/sspicli/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/sspicli/sspicli.c (100%) rename winpr/{ => libwinpr}/synch/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/synch/critical.c (100%) rename winpr/{ => libwinpr}/synch/event.c (100%) rename winpr/{ => libwinpr}/synch/mutex.c (100%) rename winpr/{ => libwinpr}/synch/semaphore.c (100%) rename winpr/{ => libwinpr}/synch/sleep.c (100%) rename winpr/{ => libwinpr}/sysinfo/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/sysinfo/sysinfo.c (100%) rename winpr/{ => libwinpr}/utils/CMakeLists.txt (100%) rename winpr/{ => libwinpr}/utils/ntlm.c (100%) rename winpr/{ => libwinpr}/utils/print.c (100%) rename winpr/{ => libwinpr}/utils/sam.c (100%) rename winpr/{ => libwinpr}/utils/stream.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 255706fd5..8e776fefa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,10 +179,13 @@ set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/free include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR}/include) +# WinPR +set(WINPR_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/winpr/include") +include_directories(${WINPR_INCLUDE_DIR}) + # Configure files -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/winpr/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/winpr/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/freerdp/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/freerdp/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/freerdp/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/freerdp/config.h) # Generate pkg-config if(NOT MSVC) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 2bee19b1f..734eb40ea 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -1,9 +1,7 @@ # WinPR: Windows Portable Runtime # winpr cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,49 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (APPLE) - # flat_namespace should be avoided, but is required for -undefined warning. Since WinPR currently has - # a lot of undefined symbols in use, use this hack until they're filled out. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-flat_namespace,-undefined,warning") -endif() +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE) -if(WITH_MONOLITHIC_BUILD) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) -endif() +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/winpr/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/winpr/config.h) -add_subdirectory(crt) -add_subdirectory(utils) -add_subdirectory(heap) -add_subdirectory(handle) -add_subdirectory(synch) -add_subdirectory(sysinfo) -add_subdirectory(bcrypt) -add_subdirectory(dsparse) -add_subdirectory(asn1) -add_subdirectory(rpc) -add_subdirectory(sspicli) -add_subdirectory(sspi) -add_subdirectory(registry) -add_subdirectory(library) - -if(WITH_MONOLITHIC_BUILD) - add_library(winpr - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $) - - target_link_libraries(winpr ${WINPR_LIBS}) -endif() +add_subdirectory(libwinpr) add_subdirectory(tools) + diff --git a/winpr/include/CMakeLists.txt b/winpr/include/CMakeLists.txt new file mode 100644 index 000000000..2d04ee5fb --- /dev/null +++ b/winpr/include/CMakeLists.txt @@ -0,0 +1,20 @@ +# WinPR: Windows Portable Runtime +# winpr cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# 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. + +file(GLOB HEADERS "winpr/*.h") +install(FILES ${HEADERS} DESTINATION include/winpr) + diff --git a/include/winpr/asn1.h b/winpr/include/winpr/asn1.h similarity index 100% rename from include/winpr/asn1.h rename to winpr/include/winpr/asn1.h diff --git a/include/winpr/bcrypt.h b/winpr/include/winpr/bcrypt.h similarity index 100% rename from include/winpr/bcrypt.h rename to winpr/include/winpr/bcrypt.h diff --git a/include/winpr/config.h.in b/winpr/include/winpr/config.h.in similarity index 100% rename from include/winpr/config.h.in rename to winpr/include/winpr/config.h.in diff --git a/include/winpr/crt.h b/winpr/include/winpr/crt.h similarity index 100% rename from include/winpr/crt.h rename to winpr/include/winpr/crt.h diff --git a/include/winpr/dsparse.h b/winpr/include/winpr/dsparse.h similarity index 100% rename from include/winpr/dsparse.h rename to winpr/include/winpr/dsparse.h diff --git a/include/winpr/handle.h b/winpr/include/winpr/handle.h similarity index 100% rename from include/winpr/handle.h rename to winpr/include/winpr/handle.h diff --git a/include/winpr/heap.h b/winpr/include/winpr/heap.h similarity index 100% rename from include/winpr/heap.h rename to winpr/include/winpr/heap.h diff --git a/include/winpr/library.h b/winpr/include/winpr/library.h similarity index 100% rename from include/winpr/library.h rename to winpr/include/winpr/library.h diff --git a/include/winpr/memory.h b/winpr/include/winpr/memory.h similarity index 100% rename from include/winpr/memory.h rename to winpr/include/winpr/memory.h diff --git a/include/winpr/midl.h b/winpr/include/winpr/midl.h similarity index 100% rename from include/winpr/midl.h rename to winpr/include/winpr/midl.h diff --git a/include/winpr/ndr.h b/winpr/include/winpr/ndr.h similarity index 100% rename from include/winpr/ndr.h rename to winpr/include/winpr/ndr.h diff --git a/include/winpr/ntlm.h b/winpr/include/winpr/ntlm.h similarity index 100% rename from include/winpr/ntlm.h rename to winpr/include/winpr/ntlm.h diff --git a/include/winpr/print.h b/winpr/include/winpr/print.h similarity index 100% rename from include/winpr/print.h rename to winpr/include/winpr/print.h diff --git a/include/winpr/registry.h b/winpr/include/winpr/registry.h similarity index 100% rename from include/winpr/registry.h rename to winpr/include/winpr/registry.h diff --git a/include/winpr/rpc.h b/winpr/include/winpr/rpc.h similarity index 100% rename from include/winpr/rpc.h rename to winpr/include/winpr/rpc.h diff --git a/include/winpr/sam.h b/winpr/include/winpr/sam.h similarity index 100% rename from include/winpr/sam.h rename to winpr/include/winpr/sam.h diff --git a/include/winpr/security.h b/winpr/include/winpr/security.h similarity index 100% rename from include/winpr/security.h rename to winpr/include/winpr/security.h diff --git a/include/winpr/sspi.h b/winpr/include/winpr/sspi.h similarity index 100% rename from include/winpr/sspi.h rename to winpr/include/winpr/sspi.h diff --git a/include/winpr/sspicli.h b/winpr/include/winpr/sspicli.h similarity index 100% rename from include/winpr/sspicli.h rename to winpr/include/winpr/sspicli.h diff --git a/include/winpr/stream.h b/winpr/include/winpr/stream.h similarity index 100% rename from include/winpr/stream.h rename to winpr/include/winpr/stream.h diff --git a/include/winpr/string.h b/winpr/include/winpr/string.h similarity index 100% rename from include/winpr/string.h rename to winpr/include/winpr/string.h diff --git a/include/winpr/synch.h b/winpr/include/winpr/synch.h similarity index 100% rename from include/winpr/synch.h rename to winpr/include/winpr/synch.h diff --git a/include/winpr/sysinfo.h b/winpr/include/winpr/sysinfo.h similarity index 100% rename from include/winpr/sysinfo.h rename to winpr/include/winpr/sysinfo.h diff --git a/include/winpr/tchar.h b/winpr/include/winpr/tchar.h similarity index 100% rename from include/winpr/tchar.h rename to winpr/include/winpr/tchar.h diff --git a/include/winpr/windows.h b/winpr/include/winpr/windows.h similarity index 100% rename from include/winpr/windows.h rename to winpr/include/winpr/windows.h diff --git a/include/winpr/winpr.h b/winpr/include/winpr/winpr.h similarity index 100% rename from include/winpr/winpr.h rename to winpr/include/winpr/winpr.h diff --git a/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h similarity index 100% rename from include/winpr/wtypes.h rename to winpr/include/winpr/wtypes.h diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt new file mode 100644 index 000000000..bd73a9ad9 --- /dev/null +++ b/winpr/libwinpr/CMakeLists.txt @@ -0,0 +1,63 @@ +# WinPR: Windows Portable Runtime +# winpr cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# 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. + +if (APPLE) + # flat_namespace should be avoided, but is required for -undefined warning. Since WinPR currently has + # a lot of undefined symbols in use, use this hack until they're filled out. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-flat_namespace,-undefined,warning") +endif() + +if(WITH_MONOLITHIC_BUILD) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() + +add_subdirectory(crt) +add_subdirectory(utils) +add_subdirectory(heap) +add_subdirectory(handle) +add_subdirectory(synch) +add_subdirectory(sysinfo) +add_subdirectory(bcrypt) +add_subdirectory(dsparse) +add_subdirectory(asn1) +add_subdirectory(rpc) +add_subdirectory(sspicli) +add_subdirectory(sspi) +add_subdirectory(registry) +add_subdirectory(library) + +if(WITH_MONOLITHIC_BUILD) + add_library(winpr + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $) + + target_link_libraries(winpr ${WINPR_LIBS}) +endif() + + diff --git a/winpr/asn1/CMakeLists.txt b/winpr/libwinpr/asn1/CMakeLists.txt similarity index 100% rename from winpr/asn1/CMakeLists.txt rename to winpr/libwinpr/asn1/CMakeLists.txt diff --git a/winpr/asn1/asn1.c b/winpr/libwinpr/asn1/asn1.c similarity index 100% rename from winpr/asn1/asn1.c rename to winpr/libwinpr/asn1/asn1.c diff --git a/winpr/bcrypt/CMakeLists.txt b/winpr/libwinpr/bcrypt/CMakeLists.txt similarity index 100% rename from winpr/bcrypt/CMakeLists.txt rename to winpr/libwinpr/bcrypt/CMakeLists.txt diff --git a/winpr/bcrypt/bcrypt.c b/winpr/libwinpr/bcrypt/bcrypt.c similarity index 100% rename from winpr/bcrypt/bcrypt.c rename to winpr/libwinpr/bcrypt/bcrypt.c diff --git a/winpr/crt/CMakeLists.txt b/winpr/libwinpr/crt/CMakeLists.txt similarity index 100% rename from winpr/crt/CMakeLists.txt rename to winpr/libwinpr/crt/CMakeLists.txt diff --git a/winpr/crt/memory.c b/winpr/libwinpr/crt/memory.c similarity index 100% rename from winpr/crt/memory.c rename to winpr/libwinpr/crt/memory.c diff --git a/winpr/crt/string.c b/winpr/libwinpr/crt/string.c similarity index 100% rename from winpr/crt/string.c rename to winpr/libwinpr/crt/string.c diff --git a/winpr/dsparse/CMakeLists.txt b/winpr/libwinpr/dsparse/CMakeLists.txt similarity index 100% rename from winpr/dsparse/CMakeLists.txt rename to winpr/libwinpr/dsparse/CMakeLists.txt diff --git a/winpr/dsparse/dsparse.c b/winpr/libwinpr/dsparse/dsparse.c similarity index 100% rename from winpr/dsparse/dsparse.c rename to winpr/libwinpr/dsparse/dsparse.c diff --git a/winpr/handle/CMakeLists.txt b/winpr/libwinpr/handle/CMakeLists.txt similarity index 100% rename from winpr/handle/CMakeLists.txt rename to winpr/libwinpr/handle/CMakeLists.txt diff --git a/winpr/handle/handle.c b/winpr/libwinpr/handle/handle.c similarity index 100% rename from winpr/handle/handle.c rename to winpr/libwinpr/handle/handle.c diff --git a/winpr/heap/CMakeLists.txt b/winpr/libwinpr/heap/CMakeLists.txt similarity index 100% rename from winpr/heap/CMakeLists.txt rename to winpr/libwinpr/heap/CMakeLists.txt diff --git a/winpr/heap/heap.c b/winpr/libwinpr/heap/heap.c similarity index 100% rename from winpr/heap/heap.c rename to winpr/libwinpr/heap/heap.c diff --git a/winpr/library/CMakeLists.txt b/winpr/libwinpr/library/CMakeLists.txt similarity index 100% rename from winpr/library/CMakeLists.txt rename to winpr/libwinpr/library/CMakeLists.txt diff --git a/winpr/library/library.c b/winpr/libwinpr/library/library.c similarity index 100% rename from winpr/library/library.c rename to winpr/libwinpr/library/library.c diff --git a/winpr/registry/CMakeLists.txt b/winpr/libwinpr/registry/CMakeLists.txt similarity index 100% rename from winpr/registry/CMakeLists.txt rename to winpr/libwinpr/registry/CMakeLists.txt diff --git a/winpr/registry/registry.c b/winpr/libwinpr/registry/registry.c similarity index 100% rename from winpr/registry/registry.c rename to winpr/libwinpr/registry/registry.c diff --git a/winpr/registry/registry_reg.c b/winpr/libwinpr/registry/registry_reg.c similarity index 100% rename from winpr/registry/registry_reg.c rename to winpr/libwinpr/registry/registry_reg.c diff --git a/winpr/registry/registry_reg.h b/winpr/libwinpr/registry/registry_reg.h similarity index 100% rename from winpr/registry/registry_reg.h rename to winpr/libwinpr/registry/registry_reg.h diff --git a/winpr/rpc/CMakeLists.txt b/winpr/libwinpr/rpc/CMakeLists.txt similarity index 100% rename from winpr/rpc/CMakeLists.txt rename to winpr/libwinpr/rpc/CMakeLists.txt diff --git a/winpr/rpc/midl.c b/winpr/libwinpr/rpc/midl.c similarity index 100% rename from winpr/rpc/midl.c rename to winpr/libwinpr/rpc/midl.c diff --git a/winpr/rpc/ndr.c b/winpr/libwinpr/rpc/ndr.c similarity index 100% rename from winpr/rpc/ndr.c rename to winpr/libwinpr/rpc/ndr.c diff --git a/winpr/rpc/ndr_array.c b/winpr/libwinpr/rpc/ndr_array.c similarity index 100% rename from winpr/rpc/ndr_array.c rename to winpr/libwinpr/rpc/ndr_array.c diff --git a/winpr/rpc/ndr_array.h b/winpr/libwinpr/rpc/ndr_array.h similarity index 100% rename from winpr/rpc/ndr_array.h rename to winpr/libwinpr/rpc/ndr_array.h diff --git a/winpr/rpc/ndr_context.c b/winpr/libwinpr/rpc/ndr_context.c similarity index 100% rename from winpr/rpc/ndr_context.c rename to winpr/libwinpr/rpc/ndr_context.c diff --git a/winpr/rpc/ndr_context.h b/winpr/libwinpr/rpc/ndr_context.h similarity index 100% rename from winpr/rpc/ndr_context.h rename to winpr/libwinpr/rpc/ndr_context.h diff --git a/winpr/rpc/ndr_correlation.c b/winpr/libwinpr/rpc/ndr_correlation.c similarity index 100% rename from winpr/rpc/ndr_correlation.c rename to winpr/libwinpr/rpc/ndr_correlation.c diff --git a/winpr/rpc/ndr_correlation.h b/winpr/libwinpr/rpc/ndr_correlation.h similarity index 100% rename from winpr/rpc/ndr_correlation.h rename to winpr/libwinpr/rpc/ndr_correlation.h diff --git a/winpr/rpc/ndr_pointer.c b/winpr/libwinpr/rpc/ndr_pointer.c similarity index 100% rename from winpr/rpc/ndr_pointer.c rename to winpr/libwinpr/rpc/ndr_pointer.c diff --git a/winpr/rpc/ndr_pointer.h b/winpr/libwinpr/rpc/ndr_pointer.h similarity index 100% rename from winpr/rpc/ndr_pointer.h rename to winpr/libwinpr/rpc/ndr_pointer.h diff --git a/winpr/rpc/ndr_private.c b/winpr/libwinpr/rpc/ndr_private.c similarity index 100% rename from winpr/rpc/ndr_private.c rename to winpr/libwinpr/rpc/ndr_private.c diff --git a/winpr/rpc/ndr_private.h b/winpr/libwinpr/rpc/ndr_private.h similarity index 100% rename from winpr/rpc/ndr_private.h rename to winpr/libwinpr/rpc/ndr_private.h diff --git a/winpr/rpc/ndr_simple.c b/winpr/libwinpr/rpc/ndr_simple.c similarity index 100% rename from winpr/rpc/ndr_simple.c rename to winpr/libwinpr/rpc/ndr_simple.c diff --git a/winpr/rpc/ndr_simple.h b/winpr/libwinpr/rpc/ndr_simple.h similarity index 100% rename from winpr/rpc/ndr_simple.h rename to winpr/libwinpr/rpc/ndr_simple.h diff --git a/winpr/rpc/ndr_string.c b/winpr/libwinpr/rpc/ndr_string.c similarity index 100% rename from winpr/rpc/ndr_string.c rename to winpr/libwinpr/rpc/ndr_string.c diff --git a/winpr/rpc/ndr_string.h b/winpr/libwinpr/rpc/ndr_string.h similarity index 100% rename from winpr/rpc/ndr_string.h rename to winpr/libwinpr/rpc/ndr_string.h diff --git a/winpr/rpc/ndr_structure.c b/winpr/libwinpr/rpc/ndr_structure.c similarity index 100% rename from winpr/rpc/ndr_structure.c rename to winpr/libwinpr/rpc/ndr_structure.c diff --git a/winpr/rpc/ndr_structure.h b/winpr/libwinpr/rpc/ndr_structure.h similarity index 100% rename from winpr/rpc/ndr_structure.h rename to winpr/libwinpr/rpc/ndr_structure.h diff --git a/winpr/rpc/ndr_union.c b/winpr/libwinpr/rpc/ndr_union.c similarity index 100% rename from winpr/rpc/ndr_union.c rename to winpr/libwinpr/rpc/ndr_union.c diff --git a/winpr/rpc/ndr_union.h b/winpr/libwinpr/rpc/ndr_union.h similarity index 100% rename from winpr/rpc/ndr_union.h rename to winpr/libwinpr/rpc/ndr_union.h diff --git a/winpr/rpc/rpc.c b/winpr/libwinpr/rpc/rpc.c similarity index 100% rename from winpr/rpc/rpc.c rename to winpr/libwinpr/rpc/rpc.c diff --git a/winpr/sspi/CMakeLists.txt b/winpr/libwinpr/sspi/CMakeLists.txt similarity index 100% rename from winpr/sspi/CMakeLists.txt rename to winpr/libwinpr/sspi/CMakeLists.txt diff --git a/winpr/sspi/CredSSP/credssp.c b/winpr/libwinpr/sspi/CredSSP/credssp.c similarity index 100% rename from winpr/sspi/CredSSP/credssp.c rename to winpr/libwinpr/sspi/CredSSP/credssp.c diff --git a/winpr/sspi/CredSSP/credssp.h b/winpr/libwinpr/sspi/CredSSP/credssp.h similarity index 100% rename from winpr/sspi/CredSSP/credssp.h rename to winpr/libwinpr/sspi/CredSSP/credssp.h diff --git a/winpr/sspi/NTLM/ntlm.c b/winpr/libwinpr/sspi/NTLM/ntlm.c similarity index 100% rename from winpr/sspi/NTLM/ntlm.c rename to winpr/libwinpr/sspi/NTLM/ntlm.c diff --git a/winpr/sspi/NTLM/ntlm.h b/winpr/libwinpr/sspi/NTLM/ntlm.h similarity index 100% rename from winpr/sspi/NTLM/ntlm.h rename to winpr/libwinpr/sspi/NTLM/ntlm.h diff --git a/winpr/sspi/NTLM/ntlm_av_pairs.c b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c similarity index 100% rename from winpr/sspi/NTLM/ntlm_av_pairs.c rename to winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.c diff --git a/winpr/sspi/NTLM/ntlm_av_pairs.h b/winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.h similarity index 100% rename from winpr/sspi/NTLM/ntlm_av_pairs.h rename to winpr/libwinpr/sspi/NTLM/ntlm_av_pairs.h diff --git a/winpr/sspi/NTLM/ntlm_compute.c b/winpr/libwinpr/sspi/NTLM/ntlm_compute.c similarity index 100% rename from winpr/sspi/NTLM/ntlm_compute.c rename to winpr/libwinpr/sspi/NTLM/ntlm_compute.c diff --git a/winpr/sspi/NTLM/ntlm_compute.h b/winpr/libwinpr/sspi/NTLM/ntlm_compute.h similarity index 100% rename from winpr/sspi/NTLM/ntlm_compute.h rename to winpr/libwinpr/sspi/NTLM/ntlm_compute.h diff --git a/winpr/sspi/NTLM/ntlm_message.c b/winpr/libwinpr/sspi/NTLM/ntlm_message.c similarity index 100% rename from winpr/sspi/NTLM/ntlm_message.c rename to winpr/libwinpr/sspi/NTLM/ntlm_message.c diff --git a/winpr/sspi/NTLM/ntlm_message.h b/winpr/libwinpr/sspi/NTLM/ntlm_message.h similarity index 100% rename from winpr/sspi/NTLM/ntlm_message.h rename to winpr/libwinpr/sspi/NTLM/ntlm_message.h diff --git a/winpr/sspi/Negotiate/negotiate.c b/winpr/libwinpr/sspi/Negotiate/negotiate.c similarity index 100% rename from winpr/sspi/Negotiate/negotiate.c rename to winpr/libwinpr/sspi/Negotiate/negotiate.c diff --git a/winpr/sspi/Negotiate/negotiate.h b/winpr/libwinpr/sspi/Negotiate/negotiate.h similarity index 100% rename from winpr/sspi/Negotiate/negotiate.h rename to winpr/libwinpr/sspi/Negotiate/negotiate.h diff --git a/winpr/sspi/Schannel/schannel.c b/winpr/libwinpr/sspi/Schannel/schannel.c similarity index 100% rename from winpr/sspi/Schannel/schannel.c rename to winpr/libwinpr/sspi/Schannel/schannel.c diff --git a/winpr/sspi/Schannel/schannel.h b/winpr/libwinpr/sspi/Schannel/schannel.h similarity index 100% rename from winpr/sspi/Schannel/schannel.h rename to winpr/libwinpr/sspi/Schannel/schannel.h diff --git a/winpr/sspi/sspi.c b/winpr/libwinpr/sspi/sspi.c similarity index 100% rename from winpr/sspi/sspi.c rename to winpr/libwinpr/sspi/sspi.c diff --git a/winpr/sspi/sspi.h b/winpr/libwinpr/sspi/sspi.h similarity index 100% rename from winpr/sspi/sspi.h rename to winpr/libwinpr/sspi/sspi.h diff --git a/winpr/sspicli/CMakeLists.txt b/winpr/libwinpr/sspicli/CMakeLists.txt similarity index 100% rename from winpr/sspicli/CMakeLists.txt rename to winpr/libwinpr/sspicli/CMakeLists.txt diff --git a/winpr/sspicli/sspicli.c b/winpr/libwinpr/sspicli/sspicli.c similarity index 100% rename from winpr/sspicli/sspicli.c rename to winpr/libwinpr/sspicli/sspicli.c diff --git a/winpr/synch/CMakeLists.txt b/winpr/libwinpr/synch/CMakeLists.txt similarity index 100% rename from winpr/synch/CMakeLists.txt rename to winpr/libwinpr/synch/CMakeLists.txt diff --git a/winpr/synch/critical.c b/winpr/libwinpr/synch/critical.c similarity index 100% rename from winpr/synch/critical.c rename to winpr/libwinpr/synch/critical.c diff --git a/winpr/synch/event.c b/winpr/libwinpr/synch/event.c similarity index 100% rename from winpr/synch/event.c rename to winpr/libwinpr/synch/event.c diff --git a/winpr/synch/mutex.c b/winpr/libwinpr/synch/mutex.c similarity index 100% rename from winpr/synch/mutex.c rename to winpr/libwinpr/synch/mutex.c diff --git a/winpr/synch/semaphore.c b/winpr/libwinpr/synch/semaphore.c similarity index 100% rename from winpr/synch/semaphore.c rename to winpr/libwinpr/synch/semaphore.c diff --git a/winpr/synch/sleep.c b/winpr/libwinpr/synch/sleep.c similarity index 100% rename from winpr/synch/sleep.c rename to winpr/libwinpr/synch/sleep.c diff --git a/winpr/sysinfo/CMakeLists.txt b/winpr/libwinpr/sysinfo/CMakeLists.txt similarity index 100% rename from winpr/sysinfo/CMakeLists.txt rename to winpr/libwinpr/sysinfo/CMakeLists.txt diff --git a/winpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c similarity index 100% rename from winpr/sysinfo/sysinfo.c rename to winpr/libwinpr/sysinfo/sysinfo.c diff --git a/winpr/utils/CMakeLists.txt b/winpr/libwinpr/utils/CMakeLists.txt similarity index 100% rename from winpr/utils/CMakeLists.txt rename to winpr/libwinpr/utils/CMakeLists.txt diff --git a/winpr/utils/ntlm.c b/winpr/libwinpr/utils/ntlm.c similarity index 100% rename from winpr/utils/ntlm.c rename to winpr/libwinpr/utils/ntlm.c diff --git a/winpr/utils/print.c b/winpr/libwinpr/utils/print.c similarity index 100% rename from winpr/utils/print.c rename to winpr/libwinpr/utils/print.c diff --git a/winpr/utils/sam.c b/winpr/libwinpr/utils/sam.c similarity index 100% rename from winpr/utils/sam.c rename to winpr/libwinpr/utils/sam.c diff --git a/winpr/utils/stream.c b/winpr/libwinpr/utils/stream.c similarity index 100% rename from winpr/utils/stream.c rename to winpr/libwinpr/utils/stream.c