Skip to content
Stephen Orso edited this page May 13, 2018 · 1 revision

WikiCMake Build LogicCMake ScriptsHerc4x.cmake

The Herc41_ExtPackageBuild script calls function herc_ExtPackageBuild for each external package that must be built from source when Hercules is built. The function herc_ExtPackageBuild is defined in Herc02_ExtPackageBuild.cmake.

herc_ExtPackageBuild is not called for a given external package when any of the following are true for that package:

  • The package has been excluded from Hercules by using -D\<pkg>=NO
  • The use of a system-installed package has been forced -D\<pkg>=SYSTEM
  • A previously-built package is to be used -D\<pkg>_DIR=\<pkg\_path>
  • The package is not required, e.g., PCRE when the target system is not Windows.

When a system-installed or previously-built package is to be included in Hercules, the function herc_Create_System_Import_Target is called to create an import target for the system or previously built package. Creation of the import target allows the remaining CMake Hercules build scripts to not care about the source of the package.

The function herc_Create_System_Import_Target is defined in Herc00_Includes.cmake.


This Wiki page Copyright © 2018 by Stephen R. Orso. This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.