From e28c988a04c15c2cedfe7e069a066463f4e4c452 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 23 Aug 2016 11:37:53 +0200 Subject: cmake: refactor boilerplate for projects Don't rely on a macro that shouldn't be necessary. The information "opentrack_boilerplate" retrieves is now factored out to be easily available to projects themselves. opentrack_boilerplate can now also build executables. When appropriate, target properties are now concatenated rather than replaced. --- proto-wine/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'proto-wine') diff --git a/proto-wine/CMakeLists.txt b/proto-wine/CMakeLists.txt index f949d1ad..780b1e16 100644 --- a/proto-wine/CMakeLists.txt +++ b/proto-wine/CMakeLists.txt @@ -3,13 +3,13 @@ if(NOT WIN32) set(SDK_WINE_NO_WRAPPER FALSE CACHE BOOL "disable Wine wrapper -- use Wine only for X-Plane") if(SDK_WINE_PREFIX) opentrack_boilerplate(opentrack-proto-wine) - opentrack_link(opentrack-proto-wine opentrack-compat opentrack-csv) + target_link_libraries(opentrack-proto-wine opentrack-csv) if(NOT SDK_WINE_NO_WRAPPER) set(my-rt -lrt) if(APPLE) set(my-rt) endif() - file(GLOB wine-deps ${PROJECT_SOURCE_DIR}/*.cxx) + file(GLOB wine-deps "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx") install(FILES ${wine-deps} DESTINATION "${opentrack-doc-src-pfx}/proto-wine") add_custom_command( OUTPUT opentrack-wrapper-wine.exe.so @@ -24,5 +24,4 @@ if(NOT WIN32) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/opentrack-wrapper-wine.exe.so" DESTINATION ${opentrack-hier-pfx}) endif() endif() - opentrack_register(opentrack-proto-wine) endif() -- cgit v1.2.3