Skip to content

Instantly share code, notes, and snippets.

from click import command, option, Option, UsageError
class MutuallyExclusiveOption(Option):
def __init__(self, *args, **kwargs):
self.mutually_exclusive = set(kwargs.pop('mutually_exclusive', []))
help = kwargs.get('help', '')
if self.mutually_exclusive:
ex_str = ', '.join(self.mutually_exclusive)
kwargs['help'] = help + (
@mjscosta
mjscosta / FindKinectSDKv2.cmake
Last active December 6, 2018 13:03 — forked from Furkanzmc/FindKinectSDKv2.cmake
Cmake file to find Kinect SDK v2 library on Windows
# Kinect SDK v2 download page
# https://www.microsoft.com/en-us/download/details.aspx?id=44561
if(WIN32)
if(NOT DEFINED ENV{KINECTSDK20_DIR})
message("KINECTSDK20_DIR environment variable not defined")
else()
file(TO_CMAKE_PATH $ENV{KINECTSDK20_DIR} CMAKE_PATH_KINECTSDK20_DIR)
if(EXISTS ${CMAKE_PATH_KINECTSDK20_DIR})