if(NOT DEFINED FALCO_ETC_DIR)
  set(FALCO_ETC_DIR "/etc")
endif()

if(DEFINED FALCO_COMPONENT)
install(FILES falco_rules.yaml
        COMPONENT "${FALCO_COMPONENT}"
	DESTINATION "${FALCO_ETC_DIR}")
else()
install(FILES falco_rules.yaml
	DESTINATION "${FALCO_ETC_DIR}")
endif()


if(NOT DEFINED FALCO_ETC_DIR)
  set(FALCO_ETC_DIR "/etc")
endif()

if(NOT DEFINED FALCO_RULES_DEST_FILENAME)
  set(FALCO_RULES_DEST_FILENAME "falco_rules.yaml")
endif()

if(DEFINED FALCO_COMPONENT)
install(FILES falco_rules.yaml
        COMPONENT "${FALCO_COMPONENT}"
	DESTINATION "${FALCO_ETC_DIR}"
	RENAME "${FALCO_RULES_DEST_FILENAME}")
else()
install(FILES falco_rules.yaml
        DESTINATION "${FALCO_ETC_DIR}"
        RENAME "${FALCO_RULES_DEST_FILENAME}")
endif()


Install falco rules with configurable filename.
Install falco rules with configurable filename.

New variable FALCO_RULES_DEST_FILENAME allows the rules file to be
installed with a different filename. Not set in the falco repo, but in
the agent repo it's installed as falco_rules.default.yaml.
