Cleanup examples

Remove logic invoked based on obsolete variable definitions. Use new
(explicit) target_link_libraries syntax to link binaries against
dependencies. Do not rely on prior knowledge about the compiler for
specifying flags and system libraries but instead directly test their
presence to be more robust.

Change-Id: I76e0d10fae6eba4b343048e4404f0a9b08c7cb6c
This commit is contained in:
Sergiu Deitsch
2022-02-16 01:03:01 +01:00
parent 90e58e10fd
commit 09ec4997fa
5 changed files with 39 additions and 43 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
# Ceres Solver - A fast non-linear least squares minimizer
# Copyright 2015 Google Inc. All rights reserved.
# Copyright 2022 Google Inc. All rights reserved.
# http://ceres-solver.org/
#
# Redistribution and use in source and binary forms, with or without
@@ -29,4 +29,4 @@
# Author: vitus@google.com (Michael Vitus)
add_executable(sampled_function sampled_function.cc)
target_link_libraries(sampled_function Ceres::ceres)
target_link_libraries(sampled_function PRIVATE Ceres::ceres)