From 8c332591c916beff3b7de4d40605d8eea1f23140 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 17 Jun 2016 09:56:47 -0400 Subject: [PATCH] Switched minimum cmake version to 3.1.0. Will announce after updating the Travis files. --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b647c6e..1f870770 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ # 3 june 2016 -cmake_minimum_required(VERSION 2.8.11) +# see https://cmake.org/gitweb?p=cmake.git;a=commit;h=95cdf132489c79e88a10fdf7a7566fa002c7680b (thanks ngladitz in irc.freenode.net/#cmake) +cmake_minimum_required(VERSION 3.1.0) # TODOs # - silence entering/leaving messages? @@ -8,6 +9,7 @@ cmake_minimum_required(VERSION 2.8.11) # - debian DESTDIR? https://github.com/andlabs/libui/pull/10 # - libui-combined* needs to be deleted so that custom command can run every time # - add notelemetry.obj to *ALL TARGETS* on VS2015 and up - https://www.infoq.com/news/2016/06/visual-cpp-telemetry +# - switch to 3.1.0 features # the docs say we need to set this up prior to project() set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8") @@ -142,10 +144,12 @@ target_compile_options(${_LIBUINAME} PUBLIC ${_COMMON_CFLAGS} PRIVATE ${_LIBUI_CFLAGS}) # TODO link directories? -# because we need 2.8.11 for CentOS, we can't use target_link_libraries(INTERFACE) for static executables :( if(BUILD_SHARED_LIBS) target_link_libraries(${_LIBUINAME} PRIVATE ${_LIBUI_LIBS}) +else() + target_link_libraries(${_LIBUINAME} + INTERFACE ${_LIBUI_LIBS}) endif() # on Windows the linker for static libraries is different; don't give it the flags if(BUILD_SHARED_LIBS) @@ -198,10 +202,6 @@ macro(_add_exec _name) set_property(TARGET ${_name} PROPERTY POSITION_INDEPENDENT_CODE True) endif() - # because we need 2.8.11 for CentOS, we can't use target_link_libraries(PUBLIC) for static executables :( - if(NOT BUILD_SHARED_LIBS) - target_link_libraries(${_name} ${_LIBUI_LIBS}) - endif() # TODOfor some reason these don't propagate if(NOT WIN32)