Use alternative way to suppress CMP0022 warning. Closes 287.
This commit is contained in:
Родитель
c66d294801
Коммит
b8368401fd
|
@ -28,6 +28,9 @@ cmake_minimum_required (VERSION 2.8.6)
|
|||
|
||||
if (COMMAND cmake_policy)
|
||||
cmake_policy (SET CMP0003 NEW)
|
||||
if (CMAKE_VERSION VERSION_GREATER 2.8.12 OR CMAKE_VERSION VERSION_EQUAL 2.8.12)
|
||||
cmake_policy (SET CMP0022 NEW)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Set CMake modules search path
|
||||
|
|
|
@ -163,17 +163,19 @@ if (NOT XCODE AND NOT MSVC)
|
|||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
# \todo This is a deprecated property in CMake version 2.8.12 - Remove below commands when CMake minimum version is 2.8.12
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
if (URHO3D_LIB_TYPE STREQUAL SHARED)
|
||||
if (NOT MSVC AND CMAKE_VERSION VERSION_LESS 2.8.11)
|
||||
get_target_property (LINK_LIBRARIES ${TARGET_NAME} LINK_LIBRARIES)
|
||||
target_link_libraries (${TARGET_NAME} LINK_PRIVATE ${LINK_LIBRARIES})
|
||||
# todo This is a deprecated property in CMake version 2.8.12 - Remove below commands when CMake minimum version is 2.8.12
|
||||
if (CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
if (URHO3D_LIB_TYPE STREQUAL SHARED)
|
||||
if (NOT MSVC AND CMAKE_VERSION VERSION_LESS 2.8.11)
|
||||
get_target_property (LINK_LIBRARIES ${TARGET_NAME} LINK_LIBRARIES)
|
||||
target_link_libraries (${TARGET_NAME} LINK_PRIVATE ${LINK_LIBRARIES})
|
||||
endif ()
|
||||
else ()
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES LINK_LIBRARIES "")
|
||||
endif ()
|
||||
else ()
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES LINK_LIBRARIES "")
|
||||
endif ()
|
||||
# \endtodo
|
||||
# end todo
|
||||
|
||||
# Generate platform specific export header file automatically
|
||||
if (NOT URHO3D_LIB_TYPE STREQUAL URHO3D_EXPORTS_LIB_TYPE OR ${CMAKE_CURRENT_SOURCE_DIR}/Urho3D.h.in IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h)
|
||||
|
|
|
@ -49,7 +49,6 @@ if "%use_mklink%" == "1" (
|
|||
if exist android-Build\CMakeFiles. rd /S /Q android-Build\CMakeFiles
|
||||
)
|
||||
echo on
|
||||
:: \todo suppress policy warning (for 2.8.12 early adopters), remove this option when CMake minimum version is 2.8.12
|
||||
set "OPT=-Wno-dev"
|
||||
set "OPT="
|
||||
cmake -E chdir %build% cmake %OPT% -G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=%source%\CMake\Toolchains\android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. %* %source%
|
||||
@popd
|
||||
|
|
|
@ -41,7 +41,7 @@ GENERATOR="Unix Makefiles"
|
|||
[[ $( uname -m ) =~ ^armv6 ]] && PLATFORM="-DRASPI=1"
|
||||
|
||||
# Create project with the respective CMake generators
|
||||
OPT=-Wno-dev # \todo suppress policy warning (for 2.8.12 early adopters), remove this option when CMake minimum version is 2.8.12
|
||||
OPT=
|
||||
[ $ANDROID_NDK ] && msg "Android build" && cmake -E make_directory android-Build && cmake -E chdir android-Build cmake $OPT -G $GENERATOR -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAINS/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. $@ $SOURCE && post_cmake android-Build
|
||||
[ $RASPI_TOOL ] && msg "Raspberry Pi build" && cmake -E make_directory raspi-Build && cmake -E chdir raspi-Build cmake $OPT -G $GENERATOR -DRASPI=1 -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAINS/raspberrypi.toolchain.cmake $@ $SOURCE && post_cmake raspi-Build
|
||||
[ $MINGW_PREFIX ] && msg "MingW build" && cmake -E make_directory mingw-Build && cmake -E chdir mingw-Build cmake $OPT -G $GENERATOR -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAINS/mingw.toolchain.cmake $@ $SOURCE && post_cmake mingw-Build
|
||||
|
|
|
@ -32,7 +32,7 @@ fi
|
|||
cmake -E make_directory $BUILD
|
||||
|
||||
# Create project with the Xcode generator
|
||||
OPT=-Wno-dev # \todo suppress policy warning (for 2.8.12 early adopters), remove this option when CMake minimum version is 2.8.12
|
||||
OPT=
|
||||
cmake -E chdir $BUILD cmake $OPT -G "Xcode" $@ $SOURCE
|
||||
|
||||
# Temporary fix: can be removed when CMake minimum required has reached 2.8.12
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
pushd %~dp0
|
||||
cmake -E make_directory Build
|
||||
echo on
|
||||
:: \todo suppress policy warning (for 2.8.12 early adopters), remove this option when CMake minimum version is 2.8.12
|
||||
set "OPT=-Wno-dev"
|
||||
set "OPT="
|
||||
cmake -E chdir Build cmake %OPT% -G "MinGW Makefiles" %* ..\Source
|
||||
@popd
|
||||
|
|
|
@ -36,7 +36,6 @@ if not "%1" == "" (
|
|||
goto loop
|
||||
)
|
||||
echo on
|
||||
:: \todo suppress policy warning (for 2.8.12 early adopters), remove this option when CMake minimum version is 2.8.12
|
||||
set "OPT=-Wno-dev"
|
||||
set "OPT="
|
||||
cmake -E chdir Build cmake %OPT% -G "Visual Studio %version%%arch%" %* ..\Source
|
||||
@popd
|
||||
|
|
Загрузка…
Ссылка в новой задаче