Fix CMake warning regarding use of @rpath on macOS

CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   pawnc

This warning is for project developers.  Use -Wno-dev to suppress it.
This commit is contained in:
Zeex 2017-12-30 19:37:00 +06:00
parent 8847c300f1
commit 7414a56d7f

View File

@ -58,6 +58,10 @@ if(UNIX)
link_libraries(pthread)
endif()
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})