提交 9cc23ef9 编写于 作者: J Julien Schueller

Bump cmake version to 3.2

上级 c4d56835
......@@ -12,7 +12,7 @@
# Benoit Scherrer, 2010 CRL, Harvard Medical School
# Copyright (c) 2008-2009 Children's Hospital Boston
#==============================================================================
cmake_minimum_required (VERSION 2.8.11)
cmake_minimum_required (VERSION 3.2)
if (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
......@@ -297,7 +297,7 @@ install ( TARGETS ${nlopt_lib}
ARCHIVE DESTINATION ${RELATIVE_INSTALL_LIB_DIR}
)
if (MSVC AND BUILD_SHARED_LIBS AND NOT CMAKE_VERSION VERSION_LESS 3.1)
if (MSVC AND BUILD_SHARED_LIBS)
install (FILES $<TARGET_PDB_FILE:${nlopt_lib}> DESTINATION ${RELATIVE_INSTALL_BIN_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT Debug)
endif ()
......
# defined since 2.8.3
if (CMAKE_VERSION VERSION_LESS 2.8.3)
get_filename_component (CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
endif ()
# Tell the user project where to find our headers and libraries
set (NLOPT_VERSION "@NLOPT_VERSION_STRING@")
......@@ -23,6 +18,3 @@ include ("${CMAKE_CURRENT_LIST_DIR}/NLoptLibraryDepends.cmake")
# These are IMPORTED targets created by NLOPTLibraryDepends.cmake
set (NLOPT_LIBRARIES "@NLOPT_LIBRARIES@")
if (CMAKE_VERSION VERSION_LESS 2.8.3)
set (CMAKE_CURRENT_LIST_DIR)
endif ()
......@@ -58,7 +58,7 @@ extern int bar(void);
int foo(void) {return bar()+1;}
")
if(APPLE AND ${CMAKE_VERSION} VERSION_GREATER 2.8.11)
if(APPLE)
set( _rpath_arg "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'" )
else()
set( _rpath_arg )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册