2012-05-24 17:05:12 -04:00
|
|
|
# WinPR: Windows Portable Runtime
|
|
|
|
# libwinpr-utils cmake build script
|
|
|
|
#
|
2012-09-20 20:45:56 -04:00
|
|
|
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
2012-05-24 17:05:12 -04:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2013-10-01 16:08:26 -04:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2012-11-30 16:13:19 -05:00
|
|
|
set(${MODULE_PREFIX}_COLLECTIONS_SRCS
|
|
|
|
collections/Queue.c
|
|
|
|
collections/Stack.c
|
2013-06-14 16:55:05 -04:00
|
|
|
collections/PubSub.c
|
2015-03-12 16:34:48 -04:00
|
|
|
collections/BipBuffer.c
|
2014-03-04 18:15:03 -05:00
|
|
|
collections/BitStream.c
|
2013-01-18 13:50:35 -05:00
|
|
|
collections/Reference.c
|
2012-12-05 19:36:45 -05:00
|
|
|
collections/ArrayList.c
|
|
|
|
collections/Dictionary.c
|
2013-08-05 17:29:14 -04:00
|
|
|
collections/LinkedList.c
|
2014-02-09 21:55:21 -05:00
|
|
|
collections/HashTable.c
|
2012-12-05 19:36:45 -05:00
|
|
|
collections/ListDictionary.c
|
2013-01-21 19:22:08 -05:00
|
|
|
collections/KeyValuePair.c
|
2013-01-22 20:36:08 -05:00
|
|
|
collections/CountdownEvent.c
|
2013-01-24 14:09:44 -05:00
|
|
|
collections/BufferPool.c
|
2013-02-14 20:39:56 -05:00
|
|
|
collections/ObjectPool.c
|
2013-04-11 21:59:02 -04:00
|
|
|
collections/StreamPool.c
|
2013-02-20 14:48:32 -05:00
|
|
|
collections/MessageQueue.c
|
|
|
|
collections/MessagePipe.c)
|
2014-09-28 11:02:39 -04:00
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_LODEPNG_SRCS
|
|
|
|
lodepng/lodepng.c
|
|
|
|
lodepng/lodepng.h)
|
2012-11-30 16:13:19 -05:00
|
|
|
|
2013-03-21 21:30:31 -04:00
|
|
|
set(${MODULE_PREFIX}_TRIO_SRCS
|
|
|
|
trio/strio.h
|
|
|
|
trio/trio.c
|
|
|
|
trio/trio.h
|
|
|
|
trio/triodef.h
|
|
|
|
trio/trionan.c
|
|
|
|
trio/trionan.h
|
|
|
|
trio/triop.h
|
|
|
|
trio/triostr.c
|
|
|
|
trio/triostr.h)
|
2015-10-21 16:13:15 +02:00
|
|
|
|
|
|
|
if (HAVE_SYSLOG_H)
|
|
|
|
set(SYSLOG_SRCS
|
|
|
|
wlog/SyslogAppender.c
|
|
|
|
wlog/SyslogAppender.h
|
|
|
|
)
|
|
|
|
endif()
|
2015-10-30 14:50:14 +01:00
|
|
|
|
|
|
|
if (LIBSYSTEMD_FOUND)
|
|
|
|
set(JOURNALD_SRCS
|
|
|
|
wlog/JournaldAppender.c
|
|
|
|
wlog/JournaldAppender.h
|
|
|
|
)
|
|
|
|
|
|
|
|
winpr_include_directory_add(${LIBSYSTEMD_INCLUDE_DIR})
|
|
|
|
winpr_library_add(${LIBSYSTEMD_LIBRARY})
|
|
|
|
endif()
|
2013-10-01 16:08:26 -04:00
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_WLOG_SRCS
|
|
|
|
wlog/wlog.c
|
|
|
|
wlog/wlog.h
|
2013-10-02 13:38:21 -04:00
|
|
|
wlog/Layout.c
|
|
|
|
wlog/Layout.h
|
|
|
|
wlog/Message.c
|
|
|
|
wlog/Message.h
|
|
|
|
wlog/TextMessage.c
|
|
|
|
wlog/TextMessage.h
|
|
|
|
wlog/DataMessage.c
|
|
|
|
wlog/DataMessage.h
|
|
|
|
wlog/ImageMessage.c
|
|
|
|
wlog/ImageMessage.h
|
2013-10-08 23:18:59 -04:00
|
|
|
wlog/PacketMessage.c
|
|
|
|
wlog/PacketMessage.h
|
2013-10-02 13:38:21 -04:00
|
|
|
wlog/Appender.c
|
|
|
|
wlog/Appender.h
|
2013-10-01 16:08:26 -04:00
|
|
|
wlog/FileAppender.c
|
|
|
|
wlog/FileAppender.h
|
2013-10-02 13:38:21 -04:00
|
|
|
wlog/BinaryAppender.c
|
|
|
|
wlog/BinaryAppender.h
|
2014-11-16 12:20:48 +01:00
|
|
|
wlog/CallbackAppender.c
|
|
|
|
wlog/CallbackAppender.h
|
2013-10-01 16:08:26 -04:00
|
|
|
wlog/ConsoleAppender.c
|
2015-10-21 16:13:15 +02:00
|
|
|
wlog/ConsoleAppender.h
|
2015-11-04 18:11:19 +01:00
|
|
|
wlog/UdpAppender.c
|
|
|
|
wlog/UdpAppender.h
|
2015-10-21 16:13:15 +02:00
|
|
|
${SYSLOG_SRCS}
|
2015-10-30 14:50:14 +01:00
|
|
|
${JOURNALD_SRCS}
|
2015-10-21 16:13:15 +02:00
|
|
|
)
|
|
|
|
|
2013-03-21 21:30:31 -04:00
|
|
|
|
2012-09-30 22:58:59 -04:00
|
|
|
set(${MODULE_PREFIX}_SRCS
|
2014-03-24 18:20:34 -04:00
|
|
|
ini.c
|
2012-11-02 00:20:46 -04:00
|
|
|
sam.c
|
2012-06-02 18:21:04 -04:00
|
|
|
ntlm.c
|
2014-09-03 16:20:50 -04:00
|
|
|
image.c
|
2012-05-25 03:24:42 -04:00
|
|
|
print.c
|
2012-11-02 00:20:46 -04:00
|
|
|
stream.c
|
2014-08-14 10:36:50 +02:00
|
|
|
debug.c
|
2015-03-30 17:50:47 +02:00
|
|
|
winpr.c
|
2014-07-28 21:55:57 +02:00
|
|
|
cmdline.c
|
|
|
|
ssl.c)
|
2012-05-24 17:05:12 -04:00
|
|
|
|
2014-08-14 10:36:50 +02:00
|
|
|
if (ANDROID)
|
2014-09-28 11:02:39 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
2014-08-14 10:36:50 +02:00
|
|
|
endif()
|
|
|
|
|
2014-07-10 00:03:20 +02:00
|
|
|
winpr_module_add(${${MODULE_PREFIX}_SRCS}
|
2013-03-21 21:30:31 -04:00
|
|
|
${${MODULE_PREFIX}_COLLECTIONS_SRCS}
|
2014-09-28 11:02:39 -04:00
|
|
|
${${MODULE_PREFIX}_LODEPNG_SRCS}
|
2013-10-01 16:08:26 -04:00
|
|
|
${${MODULE_PREFIX}_TRIO_SRCS}
|
|
|
|
${${MODULE_PREFIX}_WLOG_SRCS})
|
2012-11-30 16:13:19 -05:00
|
|
|
|
2014-07-10 00:03:20 +02:00
|
|
|
winpr_include_directory_add(
|
2014-09-28 11:02:39 -04:00
|
|
|
"lodepng"
|
2014-07-10 00:03:20 +02:00
|
|
|
"trio"
|
2015-10-05 16:23:44 -04:00
|
|
|
".")
|
|
|
|
|
|
|
|
if(OPENSSL_FOUND)
|
|
|
|
winpr_include_directory_add(${OPENSSL_INCLUDE_DIR})
|
|
|
|
winpr_library_add(${OPENSSL_LIBRARIES})
|
|
|
|
endif()
|
2012-05-24 17:05:12 -04:00
|
|
|
|
2015-10-05 16:23:44 -04:00
|
|
|
if(MBEDTLS_FOUND)
|
|
|
|
winpr_include_directory_add(${MBEDTLS_INCLUDE_DIR})
|
|
|
|
winpr_library_add(${MBEDTLS_LIBRARIES})
|
|
|
|
endif()
|
2013-03-21 21:30:31 -04:00
|
|
|
|
|
|
|
if(UNIX)
|
2014-07-10 00:03:20 +02:00
|
|
|
winpr_library_add(m)
|
2012-08-14 14:37:31 -04:00
|
|
|
endif()
|
2012-09-30 22:58:59 -04:00
|
|
|
|
2015-09-14 13:20:11 -04:00
|
|
|
if(FREEBSD)
|
2015-03-10 01:21:28 +03:00
|
|
|
winpr_library_add(execinfo)
|
|
|
|
endif()
|
|
|
|
|
2014-09-17 17:24:12 +02:00
|
|
|
if(WIN32)
|
|
|
|
winpr_library_add(Dbghelp)
|
|
|
|
endif()
|
|
|
|
|
2012-11-02 00:20:46 -04:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
2014-04-29 09:42:18 +02:00
|
|
|
|