Switched minimum cmake version to 3.1.0. Will announce after updating the Travis files.

This commit is contained in:
Pietro Gagliardi 2016-06-17 09:56:47 -04:00
parent fca6edd5a2
commit 8c332591c9
1 changed files with 6 additions and 6 deletions

View File

@ -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)