From 558ee768de3d6464655a9fa78a97738c802dbca5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 16 Sep 2014 15:37:38 +0200 Subject: [PATCH] cmake: Rely on the cmake config cmocka provides. Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam --- CMakeLists.txt | 2 +- cmake/Modules/FindCMocka.cmake | 49 ---------------------------------- 2 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 cmake/Modules/FindCMocka.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb9b0c..ec779d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ install( add_subdirectory(doc) if (UNIT_TESTING) - find_package(CMocka REQUIRED) + find_package(cmocka REQUIRED) include(AddCMockaTest) add_subdirectory(tests) endif (UNIT_TESTING) diff --git a/cmake/Modules/FindCMocka.cmake b/cmake/Modules/FindCMocka.cmake deleted file mode 100644 index 2dd9fc5..0000000 --- a/cmake/Modules/FindCMocka.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# - Try to find CMocka -# Once done this will define -# -# CMOCKA_ROOT_DIR - Set this variable to the root installation of CMocka -# -# Read-Only variables: -# CMOCKA_FOUND - system has CMocka -# CMOCKA_INCLUDE_DIR - the CMocka include directory -# CMOCKA_LIBRARIES - Link these to use CMocka -# CMOCKA_DEFINITIONS - Compiler switches required for using CMocka -# -#============================================================================= -# Copyright (c) 2011-2012 Andreas Schneider -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# - -find_path(CMOCKA_INCLUDE_DIR - NAMES - cmocka.h - PATHS - ${CMOCKA_ROOT_DIR}/include -) - -find_library(CMOCKA_LIBRARY - NAMES - cmocka - PATHS - ${CMOCKA_ROOT_DIR}/include -) - -if (CMOCKA_LIBRARY) - set(CMOCKA_LIBRARIES - ${CMOCKA_LIBRARIES} - ${CMOCKA_LIBRARY} - ) -endif (CMOCKA_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CMocka DEFAULT_MSG CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) - -# show the CMOCKA_INCLUDE_DIR and CMOCKA_LIBRARIES variables only in the advanced view -mark_as_advanced(CMOCKA_INCLUDE_DIR CMOCKA_LIBRARIES) -- 2.34.1