diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ead8a80..b8aceb84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(mosquitto) -cmake_minimum_required(VERSION 2.8) -# Only for version 3 and up. cmake_policy(SET CMP0042 NEW) +cmake_minimum_required(VERSION 3.0) +cmake_policy(SET CMP0042 NEW) set (VERSION 1.6.12) @@ -22,6 +22,10 @@ if (WIN32) add_definitions("-D_CRT_NONSTDC_NO_DEPRECATE") endif (WIN32) +if(APPLE) + set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup") +endif(APPLE) + include(GNUInstallDirs) option(WITH_BUNDLED_DEPS "Build with bundled dependencies?" ON)