From 5075ced78b504b1d32ad6becb4eb857764d30cdb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 23 May 2016 10:44:14 +0200 Subject: cmake: fix boilerplate for NO-LIBRARY + STAGE2 --- cmake/opentrack-boilerplate.cmake | 4 +++- gui/CMakeLists.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 3875c46b..3838ca41 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -42,6 +42,8 @@ function(opentrack_boilerplate__ n files_ no-library_ static_ no-compat_ compile set(link-mode STATIC) endif() add_library(${n} ${link-mode} ${files_}) + endif() + if(NOT no-library_) opentrack_compat(${n}) endif() if(NOT no-compat_) @@ -72,7 +74,7 @@ function(opentrack_boilerplate__ n files_ no-library_ static_ no-compat_ compile string(REGEX REPLACE "^opentrack-" "" n_ ${n}) string(REPLACE "-" "_" n_ ${n_}) target_compile_definitions(${n} PRIVATE "BUILD_${n_}") - if(NOT static_) + if((NOT static_) AND (NOT no-library_)) install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .) endif() endfunction() diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 3b2e60e1..08534795 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -34,5 +34,4 @@ if(LINUX) endif() opentrack_boilerplate(opentrack STAGE2) -install(TARGETS opentrack DESTINATION .) -- cgit v1.2.3