From 0b4397eaf3a1c5c36df43c71d8d406869030c9f4 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Fri, 15 Mar 2019 11:53:42 +0100 Subject: [PATCH] require newer cmake versions on windows and use target_link_directories --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a04f5c..dc6a33c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,7 @@ cmake_minimum_required (VERSION 3.9) +if (WIN32) + cmake_minimum_required (VERSION 3.13) +endif() #Only set project name if CoMISo is built as stand-alone library if("${PROJECT_NAME}" STREQUAL "") @@ -417,6 +420,10 @@ message("COMISO_LINK_DIRECTORIES: ${COMISO_LINK_DIRECTORIES}") if (COMISO_LINK_DIRECTORIES) set_target_properties(CoMISo PROPERTIES LINK_DIRECTORIES ${COMISO_LINK_DIRECTORIES}) endif() +if (WIN32) +#TODO: do this also for non windows platforms as soon as we can require cmake 3.13 + target_link_directories(CoMISo PUBLIC ${COMISO_LINK_DIRECTORIES}) +endif() # generate dllexport macros on windows if (WIN32) -- GitLab