mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
1edf138506
For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
21 lines
574 B
CMake
21 lines
574 B
CMake
enable_language(C)
|
|
|
|
# First call
|
|
find_package(GTK2 REQUIRED)
|
|
|
|
# Backup variables
|
|
set(GTK2_LIBRARIES_BAK ${GTK2_LIBRARIES})
|
|
set(GTK2_TARGETS_BAK ${GTK2_TARGETS})
|
|
|
|
# Second call
|
|
find_package(GTK2 REQUIRED)
|
|
|
|
# Check variables
|
|
if(NOT "${GTK2_LIBRARIES_BAK}" STREQUAL "${GTK2_LIBRARIES}")
|
|
message(SEND_ERROR "GTK2_LIBRARIES is different:\nbefore: ${GTK2_LIBRARIES_BAK}\nafter: ${GTK2_LIBRARIES}")
|
|
endif()
|
|
|
|
if(NOT "${GTK2_TARGETS_BAK}" STREQUAL "${GTK2_TARGETS}")
|
|
message(SEND_ERROR "GTK2_TARGETS is different:\nbefore: ${GTK2_TARGETS_BAK}\nafter: ${GTK2_TARGETS}")
|
|
endif()
|