Enable some CMake policies in Java example.

This commit is contained in:
levlam 2021-09-01 19:25:00 +03:00
parent 8e41fd1aab
commit 438ae78e8a

View File

@ -1,11 +1,25 @@
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
if (POLICY CMP0065)
# do not export symbols from executables
# affects compiler checks in project(), so must be set before it
cmake_policy(SET CMP0065 NEW)
endif()
project(TdJavaExample VERSION 1.0 LANGUAGES CXX)
if (POLICY CMP0054)
# do not expand quoted arguments
cmake_policy(SET CMP0054 NEW)
endif()
if (POLICY CMP0060)
# link libraries by full path
cmake_policy(SET CMP0060 NEW)
endif()
if (POLICY CMP0074)
# use environment variables to find libraries
cmake_policy(SET CMP0074 NEW)
endif()
find_package(Td REQUIRED)