From 74001fb4ce5041c3deb42a0ca252ae338aa571db Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 07 12月 2019 18:13:59 +0800 Subject: [PATCH] modified cmake scripts for easy export and import --- cmake/Findlcc.cmake | 81 ++++++++++++++++++++-------------------- 1 files changed, 40 insertions(+), 41 deletions(-) diff --git a/cmake/Findlcc.cmake b/cmake/Findlcc.cmake index f38441f..0f95a42 100644 --- a/cmake/Findlcc.cmake +++ b/cmake/Findlcc.cmake @@ -1,45 +1,44 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. +# Distributed under the OSI-approved BSD 3-Clause License. #[=======================================================================[.rst: -Findlcc -------- - -Find or build the lcc executable. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``license_generator::lcc`` - The lcc executable - -If lcc is not found this module will try to download it as a submodule -Git must be installed. - -Input variables -^^^^^^^^^^^^^^^^ - -``LCC_LOCATION`` Hint for locating the lcc executable - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``LCC_FOUND`` - True if the system has the Foo library. -``lcc_VERSION`` - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables will also be set: - -``LCC_EXECUTABLE`` - Path to the lcc executable. - +#Findlcc +#------- +# +#Find or build the lcc executable. +# +#Imported Targets +#^^^^^^^^^^^^^^^^ +# +#This module provides the following imported targets, if found: +# +#``license_generator::lcc`` +# The lcc executable +# +#If lcc is not found this module will try to download it as a submodule +#Git must be installed. +# +#Input variables +#^^^^^^^^^^^^^^^^ +# +#``LCC_LOCATION`` Hint for locating the lcc executable +# +#Result Variables +#^^^^^^^^^^^^^^^^ +# +#This will define the following variables: +# +#``LCC_FOUND`` +# True if the system has the Foo library. +#``lcc_VERSION`` +# +#Cache Variables +#^^^^^^^^^^^^^^^ +# +#The following cache variables will also be set: +# +#``LCC_EXECUTABLE`` +# Path to the lcc executable. +# #]=======================================================================] set(lcc_names lcc lcc.exe) @@ -56,7 +55,7 @@ add_executable(license_generator::lcc IMPORTED GLOBAL) set_property(TARGET license_generator::lcc PROPERTY IMPORTED_LOCATION ${LCC_EXECUTABLE}) ELSE(LCC_LOCATION) - find_package(lcc HINTS ${CMAKE_BINARY_DIR} NO_CMAKE_PATH) #try to find it without looping on this module + find_package(lcc HINTS ${CMAKE_BINARY_DIR} CONFIG) #try to find it without looping on this module IF(NOT lcc_FOUND) find_package(Git QUIET) -- Gitblit v1.9.1