-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Clean up CMake files (#6802)
Explicitly list required components when using FindJava and FindJNI Consolidate find_package calls for Java, JNI, and OpenCV into the root CMakeLists.txt file Remove references to main_lib_dest Install missing generated headers Flatten some if statements Use LinkMacOSGUI macro instead of hand rolling it Stop installing OpenCV libraries and an extra ntcorejni library; OpenCV JAR will still be installed to make it easy to use Only print platform version on Windows Prevent GUI modules from being built when wpimath is off, which would otherwise cause a build failure Simplify build configuration checks Clean up fieldImages JAR creation Place built JARs in the same subdir as installed JARs Remove unnecessary JAR includes Remove extra directories in target_include_directories Improve CMake docs
- Loading branch information
Showing
21 changed files
with
132 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
function(wpilib_config) | ||
cmake_parse_arguments(config "" "" "OPTIONS;REQUIRES" ${ARGN}) | ||
foreach(opt ${config_OPTIONS}) | ||
if(NOT ${opt}) | ||
return() | ||
endif() | ||
endforeach() | ||
foreach(required_opt ${config_REQUIRES}) | ||
if(NOT ${required_opt}) | ||
list(JOIN config_OPTIONS " and " options_list) | ||
list(LENGTH config_OPTIONS option_len) | ||
if(option_len GREATER 1) | ||
set(requires require) | ||
set(option_msg "one of the listed options") | ||
else() | ||
set(requires requires) | ||
set(option_msg ${options_list}) | ||
endif() | ||
|
||
message( | ||
FATAL_ERROR | ||
" | ||
FATAL: ${options_list} ${requires} ${required_opt}. | ||
Either enable ${required_opt} or disable ${option_msg}. | ||
" | ||
) | ||
endif() | ||
endforeach() | ||
endfunction() |
Oops, something went wrong.