add a message when package is found

pull/3573/head
Stefano Sinigardi 6 years ago
parent b9e7cd3d35
commit 6daa15b84f
  1. 2
      .gitignore
  2. 10
      DarknetConfig.cmake.in
  3. 10
      build.ps1

2
.gitignore vendored

@ -29,6 +29,8 @@ build/*.txt
build/*.json build/*.json
build/CMakeFiles/ build/CMakeFiles/
build/detect_cuda_compute_capabilities.cu build/detect_cuda_compute_capabilities.cu
build/.ninja_deps
build/.ninja_log
# OS Generated # # OS Generated #
.DS_Store* .DS_Store*

@ -21,8 +21,9 @@ endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON) set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_dependency(Threads) find_dependency(Threads)
if(@MSVC@) if(MSVC)
find_dependency(PThreads_windows) find_dependency(PThreads_windows)
set(CMAKE_CXX_FLAGS "/wd4018 /wd4244 /wd4267 /wd4305 ${CMAKE_CXX_FLAGS}")
endif() endif()
if(@OPENMP_FOUND@) if(@OPENMP_FOUND@)
@ -31,3 +32,10 @@ endif()
# Our library dependencies (contains definitions for IMPORTED targets) # Our library dependencies (contains definitions for IMPORTED targets)
include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake") include("${Darknet_CMAKE_DIR}/DarknetTargets.cmake")
include("${Darknet_CMAKE_DIR}/DarknetConfigVersion.cmake")
get_target_property(FULL_DARKNET_INCLUDE_DIRS Darknet::dark INTERFACE_INCLUDE_DIRECTORIES)
list(GET FULL_DARKNET_INCLUDE_DIRS 0 Darknet_INCLUDE_DIR)
get_filename_component(Darknet_INCLUDE_DIR "${Darknet_INCLUDE_DIR}" REALPATH)
find_package_handle_standard_args(Darknet REQUIRED_VARS Darknet_INCLUDE_DIR VERSION_VAR PACKAGE_VERSION)

@ -2,7 +2,7 @@
$number_of_build_workers=8 $number_of_build_workers=8
$use_vcpkg=$true $use_vcpkg=$true
$force_ninja=$true $use_ninja=$false
function getProgramFiles32bit() { function getProgramFiles32bit() {
$out = ${env:PROGRAMFILES(X86)} $out = ${env:PROGRAMFILES(X86)}
@ -113,7 +113,7 @@ if ($null -eq (Get-Command "cl.exe" -ErrorAction SilentlyContinue)) {
$tokens = getLatestVisualStudioWithDesktopWorkloadVersion $tokens = getLatestVisualStudioWithDesktopWorkloadVersion
$tokens = $tokens.split('.') $tokens = $tokens.split('.')
if($force_ninja) { if($use_ninja) {
$generator = "Ninja" $generator = "Ninja"
} }
else { else {
@ -154,7 +154,7 @@ if ($use_vcpkg) {
## DEBUG ## DEBUG
#New-Item -Path .\build_win_debug -ItemType directory -Force #New-Item -Path .\build_win_debug -ItemType directory -Force
#Set-Location build_win_debug #Set-Location build_win_debug
#if ($force_ninja) { #if ($use_ninja) {
#cmake -G "$generator" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" #"-DCMAKE_BUILD_TYPE=Debug" $additional_build_setup .. #cmake -G "$generator" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" #"-DCMAKE_BUILD_TYPE=Debug" $additional_build_setup ..
#$dllfolder = "." #$dllfolder = "."
#} #}
@ -176,7 +176,7 @@ if ($use_vcpkg) {
# RELEASE # RELEASE
New-Item -Path .\build_win_release -ItemType directory -Force New-Item -Path .\build_win_release -ItemType directory -Force
Set-Location build_win_release Set-Location build_win_release
if($force_ninja) { if($use_ninja) {
cmake -G "$generator" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" "-DCMAKE_BUILD_TYPE=Release" $additional_build_setup .. cmake -G "$generator" "-DCMAKE_TOOLCHAIN_FILE=$vcpkg_path\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=$vcpkg_triplet" "-DCMAKE_BUILD_TYPE=Release" $additional_build_setup ..
$dllfolder = "." $dllfolder = "."
} }
@ -200,7 +200,7 @@ else {
# if you want to manually force this case, remove VCPKG_ROOT env variable and remember to use "vcpkg integrate remove" in case you had enabled user-wide vcpkg integration # if you want to manually force this case, remove VCPKG_ROOT env variable and remember to use "vcpkg integrate remove" in case you had enabled user-wide vcpkg integration
New-Item -Path .\build_win_release_novcpkg -ItemType directory -Force New-Item -Path .\build_win_release_novcpkg -ItemType directory -Force
Set-Location build_win_release_novcpkg Set-Location build_win_release_novcpkg
if($force_ninja) { if($use_ninja) {
cmake -G "$generator" $additional_build_setup .. cmake -G "$generator" $additional_build_setup ..
} }
else { else {

Loading…
Cancel
Save