[Spice-devel] [vdagent-win PATCH 13/13] build: Base cmake support

Christophe Fergeau cfergeau at redhat.com
Mon May 28 13:09:37 UTC 2018


Lacking some rationale in the commit log I think ;)
vdagent-win already has 2 build systems (mingw+autotools and VS), there
are patches to port other spice components to meson, so why cmake here?

Christophe


On Mon, May 28, 2018 at 09:58:06AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  Makefile.am    |  3 ++-
>  2 files changed, 50 insertions(+), 1 deletion(-)
>  create mode 100644 CMakeLists.txt
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> new file mode 100644
> index 0000000..c4b8b95
> --- /dev/null
> +++ b/CMakeLists.txt
> @@ -0,0 +1,48 @@
> +cmake_minimum_required(VERSION 2.6)
> +
> +# TODO missing libpng flags
> +# EXPERIMENTAL
> +#set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
> +
> +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -s")
> +
> +find_package(PNG REQUIRED)
> +
> +include_directories(common . spice-protocol ${PNG_INCLUDE_DIR})
> +add_definitions(-DUNICODE -D_UNICODE -DOLDMSVCRT)
> +add_executable(vdagent
> +	common/vdcommon.cpp
> +	common/vdcommon.h
> +	common/vdlog.cpp
> +	common/vdlog.h
> +	vdagent/display_configuration.cpp
> +	vdagent/display_configuration.h
> +	vdagent/desktop_layout.cpp
> +	vdagent/desktop_layout.h
> +	vdagent/display_setting.cpp
> +	vdagent/display_setting.h
> +	vdagent/file_xfer.cpp
> +	vdagent/file_xfer.h
> +	vdagent/vdagent.cpp
> +	vdagent/as_user.cpp
> +	vdagent/as_user.h
> +	vdagent/image.cpp
> +	vdagent/image.h
> +	vdagent/imagepng.cpp
> +	vdagent/imagepng.h
> +    vdagent/vdagent.rc
> +)
> +target_link_libraries(vdagent ${PNG_LIBRARY} ${ZLIB_LIBRARY} wtsapi32)
> +set_target_properties(vdagent PROPERTIES LINK_FLAGS -mwindows)
> +
> +add_executable(vdservice
> +	common/stdint.h
> +	common/vdcommon.cpp
> +	common/vdcommon.h
> +	common/vdlog.cpp
> +	common/vdlog.h
> +	vdservice/vdservice.cpp
> +    vdservice/vdservice.rc
> +)
> +target_link_libraries(vdservice wtsapi32)
> +set_target_properties(vdservice PROPERTIES LINK_FLAGS -mconsole)
> diff --git a/Makefile.am b/Makefile.am
> index 3020824..79f6951 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -129,7 +129,8 @@ EXTRA_DIST +=			\
>  	vdagent/vdagent.vcproj	\
>  	vdservice/resource.h	\
>  	vdservice/vdservice.rc	\
> -	vdservice/vdservice.vcproj
> +	vdservice/vdservice.vcproj \
> +	CMakeLists.txt
>  
>  # see git-version-gen
>  dist-hook:
> -- 
> 2.17.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180528/24ee7beb/attachment.sig>


More information about the Spice-devel mailing list