2013-01-19 02:32:58 +04:00
|
|
|
# FreeRDP: A Remote Desktop Protocol Client
|
|
|
|
# libfreerdp-primitives cmake build script
|
|
|
|
# vi:ts=4 sw=4:
|
|
|
|
#
|
|
|
|
# (c) Copyright 2012 Hewlett-Packard Development Company, L.P.
|
|
|
|
# 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-01-19 05:47:18 +04:00
|
|
|
set(MODULE_NAME "freerdp-primitives")
|
|
|
|
set(MODULE_PREFIX "FREERDP_PRIMITIVES")
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS
|
2014-07-03 00:30:04 +04:00
|
|
|
prim_16to32bpp.c
|
2013-01-19 05:47:18 +04:00
|
|
|
prim_add.c
|
|
|
|
prim_andor.c
|
|
|
|
prim_alphaComp.c
|
|
|
|
prim_colors.c
|
|
|
|
prim_copy.c
|
|
|
|
prim_set.c
|
|
|
|
prim_shift.c
|
|
|
|
prim_sign.c
|
2014-09-07 01:10:27 +04:00
|
|
|
prim_YUV.c
|
2014-07-03 00:30:04 +04:00
|
|
|
prim_YCoCg.c
|
2013-01-19 02:32:58 +04:00
|
|
|
primitives.c
|
2013-01-19 05:47:18 +04:00
|
|
|
prim_internal.h)
|
2013-01-19 02:32:58 +04:00
|
|
|
|
2013-02-21 14:45:10 +04:00
|
|
|
set(${MODULE_PREFIX}_OPT_SRCS
|
2014-07-03 00:30:04 +04:00
|
|
|
prim_16to32bpp_opt.c
|
2013-02-21 14:45:10 +04:00
|
|
|
prim_add_opt.c
|
|
|
|
prim_andor_opt.c
|
|
|
|
prim_alphaComp_opt.c
|
|
|
|
prim_colors_opt.c
|
|
|
|
prim_set_opt.c
|
|
|
|
prim_shift_opt.c
|
2014-07-03 00:30:04 +04:00
|
|
|
prim_sign_opt.c
|
|
|
|
prim_YCoCg_opt.c)
|
2013-02-21 14:45:10 +04:00
|
|
|
|
2013-01-19 02:32:58 +04:00
|
|
|
add_definitions(-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
|
|
|
|
|
|
|
### IPP Variable debugging
|
|
|
|
if(WITH_IPP)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
foreach(INCLDIR ${IPP_INCLUDE_DIRS})
|
|
|
|
set(OPTIMIZATION "${OPTIMIZATION} -I${INCLDIR}")
|
|
|
|
endforeach(INCLDIR)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_SSE2)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
set(OPTIMIZATION "${OPTIMIZATION} -msse2 -mssse3 -Wdeclaration-after-statement")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(OPTIMIZATION "${OPTIMIZATION} /arch:SSE2")
|
|
|
|
endif()
|
|
|
|
elseif(WITH_NEON)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
2013-02-20 04:08:27 +04:00
|
|
|
set(OPTIMIZATION "${OPTIMIZATION} -mfpu=neon -mfloat-abi=${ARM_FP_ABI}")
|
2013-01-19 02:32:58 +04:00
|
|
|
endif()
|
|
|
|
# TODO: Add MSVC equivalent
|
|
|
|
endif()
|
|
|
|
|
2013-02-21 14:45:10 +04:00
|
|
|
set_property(SOURCE ${${MODULE_PREFIX}_OPT_SRCS} PROPERTY COMPILE_FLAGS ${OPTIMIZATION})
|
|
|
|
|
|
|
|
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${${MODULE_PREFIX}_OPT_SRCS})
|
2013-01-19 02:32:58 +04:00
|
|
|
|
2013-01-19 05:47:18 +04:00
|
|
|
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
|
|
|
MONOLITHIC ${MONOLITHIC_BUILD}
|
2014-04-23 12:16:02 +04:00
|
|
|
SOURCES ${${MODULE_PREFIX}_SRCS}
|
|
|
|
EXPORT)
|
2013-01-19 02:32:58 +04:00
|
|
|
|
2014-04-29 11:42:18 +04:00
|
|
|
if (WITH_LIBRARY_VERSIONING)
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
|
|
|
endif()
|
|
|
|
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
|
2013-01-19 23:27:34 +04:00
|
|
|
|
|
|
|
if(IPP_FOUND)
|
|
|
|
include_directories(${IPP_INCLUDE_DIRS})
|
|
|
|
foreach(ipp_lib ${IPP_LIBRARIES})
|
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} "${ipp_lib}_imported")
|
|
|
|
endforeach()
|
|
|
|
endif()
|
2013-01-19 02:32:58 +04:00
|
|
|
|
2014-07-10 02:03:20 +04:00
|
|
|
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
|
2013-03-04 13:16:40 +04:00
|
|
|
|
2013-01-19 05:47:18 +04:00
|
|
|
if(MONOLITHIC_BUILD)
|
|
|
|
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
2013-01-19 02:32:58 +04:00
|
|
|
else()
|
2013-01-19 05:47:18 +04:00
|
|
|
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
2013-10-29 07:06:39 +04:00
|
|
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets)
|
2013-01-19 02:32:58 +04:00
|
|
|
endif()
|
|
|
|
|
2013-01-19 05:47:18 +04:00
|
|
|
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
|
|
|
|
|
2013-01-20 05:32:14 +04:00
|
|
|
if(BUILD_TESTING AND ((NOT WIN32) AND (NOT APPLE)))
|
2014-09-04 23:46:20 +04:00
|
|
|
add_subdirectory(test)
|
2013-01-19 05:47:18 +04:00
|
|
|
endif()
|
2013-01-19 23:27:34 +04:00
|
|
|
|