From 751ecba2830e0eeec63c3ded93b43ae83a28a476 Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 2 Aug 2013 09:17:29 -0400 Subject: [PATCH 1/2] Update commands.rst --- docs/commands.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/commands.rst b/docs/commands.rst index ab7e60d1..45b50c83 100644 --- a/docs/commands.rst +++ b/docs/commands.rst @@ -41,8 +41,8 @@ this. - Print some help. -- */q/* +- */q* - - Quit Tox. (why ;\_;) + - Quit Tox. From 247c42095744ec065d2bee989144f4548b5d3bc7 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 2 Aug 2013 16:39:54 +0200 Subject: [PATCH 2/2] cmake: Rewrite FindSODIUM. Signed-off-by: Andreas Schneider Signed-off-by: irungentoo --- cmake/FindSODIUM.cmake | 70 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/cmake/FindSODIUM.cmake b/cmake/FindSODIUM.cmake index ffb6a1f7..fd6206ff 100644 --- a/cmake/FindSODIUM.cmake +++ b/cmake/FindSODIUM.cmake @@ -1,15 +1,67 @@ -# Find SODIUM +# - Try to find SODIUM +# Once done this will define # -# SODIUM_INCLUDE_DIR -# SODIUM_LIBRARY -# SODIUM_FOUND +# SODIUM_ROOT_DIR - Set this variable to the root installation of CMocka +# +# Read-Only variables: +# SODIUM_FOUND - system has SODIUM +# SODIUM_INCLUDE_DIR - the SODIUM include directory +# SODIUM_LIBRARIES - Link these to use SODIUM +# SODIUM_DEFINITIONS - Compiler switches required for using SODIUM +# +#============================================================================= +# Copyright (c) 2013 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(SODIUM_INCLUDE_DIR NAMES sodium.h) +set(_SODIUM_ROOT_HINTS +) -FIND_LIBRARY(SODIUM_LIBRARY NAMES sodium) +set(_SODIUM_ROOT_PATHS + "$ENV{PROGRAMFILES}/sodium" +) -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SODIUM DEFAULT_MSG SODIUM_LIBRARY SODIUM_INCLUDE_DIR) +find_path(SODIUM_ROOT_DIR + NAMES + include/cmocka.h + HINTS + ${_SODIUM_ROOT_HINTS} + PATHS + ${_SODIUM_ROOT_PATHS} +) +mark_as_advanced(SODIUM_ROOT_DIR) + +find_path(SODIUM_INCLUDE_DIR + NAMES + sodium.h + PATHS + ${SODIUM_ROOT_DIR}/include +) + +find_library(SODIUM_LIBRARY + NAMES + sodium + PATHS + ${SODIUM_ROOT_DIR}/lib +) + +if (SODIUM_LIBRARY) + set(SODIUM_LIBRARIES + ${SODIUM_LIBRARIES} + ${SODIUM_LIBRARY} + ) +endif (SODIUM_LIBRARY) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SODIUM DEFAULT_MSG SODIUM_LIBRARIES SODIUM_INCLUDE_DIR) + +# show the SODIUM_INCLUDE_DIR and SODIUM_LIBRARIES variables only in the advanced view +mark_as_advanced(SODIUM_INCLUDE_DIR SODIUM_LIBRARIES) -MARK_AS_ADVANCED(SODIUM_INCLUDE_DIR SODIUM_LIBRARY)