aboutsummaryrefslogtreecommitdiff
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorCarlos Hernandez <chernand@google.com>2014-08-07 17:51:38 -0700
committerCarlos Hernandez <chernand@google.com>2014-08-11 20:38:34 +0000
commit79397c21138f54fcff6ec067b44b847f1f7e0e98 (patch)
treeb2c33877af479b37f082fcbcaf50a24a49b69415 /examples/CMakeLists.txt
parentad78e589f893a53da23bbdf41274d89dae656f54 (diff)
downloadceres-solver-79397c21138f54fcff6ec067b44b847f1f7e0e98.tar.gz
Update ceres to the latest version in g3android-wear-5.0.0_r1android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-release
Please pay special attention to the changes in Android.mk. They are the only real changes I had to make. Bug: 16953678 Change-Id: I44a644358e779aaff99a2ea822387fe49ac26888
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt40
1 files changed, 33 insertions, 7 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 9dfc80b..dbbcb81 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -28,6 +28,13 @@
#
# Author: keir@google.com (Keir Mierle)
+# Only Ceres itself should be compiled with CERES_BUILDING_SHARED_LIBRARY
+# defined, any users of Ceres will have CERES_USING_SHARED_LIBRARY defined
+# for them in Ceres' config.h if appropriate.
+IF (BUILD_SHARED_LIBS)
+ REMOVE_DEFINITIONS(-DCERES_BUILDING_SHARED_LIBRARY)
+ENDIF()
+
ADD_EXECUTABLE(helloworld helloworld.cc)
TARGET_LINK_LIBRARIES(helloworld ceres)
@@ -42,7 +49,15 @@ TARGET_LINK_LIBRARIES(curve_fitting ceres)
ADD_EXECUTABLE(curve_fitting_c curve_fitting.c)
TARGET_LINK_LIBRARIES(curve_fitting_c ceres)
+# As this is a C file #including <math.h> we have to explicitly add the math
+# library (libm). Although some compilers (dependent upon options) will accept
+# the indirect link to libm via Ceres, at least GCC 4.8 on pure Debian won't.
+IF (NOT MSVC)
+ TARGET_LINK_LIBRARIES(curve_fitting_c m)
+ENDIF (NOT MSVC)
+ADD_EXECUTABLE(ellipse_approximation ellipse_approximation.cc)
+TARGET_LINK_LIBRARIES(ellipse_approximation ceres)
ADD_EXECUTABLE(robust_curve_fitting robust_curve_fitting.cc)
TARGET_LINK_LIBRARIES(robust_curve_fitting ceres)
@@ -53,26 +68,37 @@ TARGET_LINK_LIBRARIES(simple_bundle_adjuster ceres)
IF (GFLAGS)
ADD_EXECUTABLE(powell powell.cc)
- TARGET_LINK_LIBRARIES(powell ceres)
+ TARGET_LINK_LIBRARIES(powell ceres ${GFLAGS_LIBRARIES})
ADD_EXECUTABLE(nist nist.cc)
- TARGET_LINK_LIBRARIES(nist ceres)
+ TARGET_LINK_LIBRARIES(nist ceres ${GFLAGS_LIBRARIES})
+
+ ADD_EXECUTABLE(more_garbow_hillstrom more_garbow_hillstrom.cc)
+ TARGET_LINK_LIBRARIES(more_garbow_hillstrom ceres ${GFLAGS_LIBRARIES})
ADD_EXECUTABLE(circle_fit circle_fit.cc)
- TARGET_LINK_LIBRARIES(circle_fit ceres)
+ TARGET_LINK_LIBRARIES(circle_fit ceres ${GFLAGS_LIBRARIES})
ADD_EXECUTABLE(bundle_adjuster
bundle_adjuster.cc
bal_problem.cc)
- TARGET_LINK_LIBRARIES(bundle_adjuster ceres)
+ TARGET_LINK_LIBRARIES(bundle_adjuster ceres ${GFLAGS_LIBRARIES})
ADD_EXECUTABLE(libmv_bundle_adjuster
libmv_bundle_adjuster.cc)
- TARGET_LINK_LIBRARIES(libmv_bundle_adjuster ceres)
+ TARGET_LINK_LIBRARIES(libmv_bundle_adjuster ceres ${GFLAGS_LIBRARIES})
+
+ ADD_EXECUTABLE(libmv_homography
+ libmv_homography.cc)
+ TARGET_LINK_LIBRARIES(libmv_homography ceres ${GFLAGS_LIBRARIES})
ADD_EXECUTABLE(denoising
denoising.cc
fields_of_experts.cc)
- TARGET_LINK_LIBRARIES(denoising ceres)
-ENDIF (GFLAGS)
+ TARGET_LINK_LIBRARIES(denoising ceres ${GFLAGS_LIBRARIES})
+
+ ADD_EXECUTABLE(robot_pose_mle
+ robot_pose_mle.cc)
+ TARGET_LINK_LIBRARIES(robot_pose_mle ceres ${GFLAGS_LIBRARIES})
+ENDIF (GFLAGS)