Skip to content

Commit 8f6c546

Browse files
Merge branch 'develop' of https://github.com/david-cattermole/mayaMatchMoveSolver into develop
2 parents 73f6898 + 863364c commit 8f6c546

57 files changed

Lines changed: 300 additions & 453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/CMakeLists.txt

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,6 @@
1919

2020
cmake_minimum_required(VERSION 3.15)
2121

22-
23-
# The "project" command will overwrite the "VERSION" variables. We set
24-
# the VERSION variables after the "project" command, so it should not
25-
# affect us.
26-
#
27-
# https://cmake.org/cmake/help/latest/policy/CMP0048.html
28-
cmake_policy(SET CMP0048 NEW)
29-
30-
# # Honor visibility properties for all target types.
31-
# #
32-
# # https://cmake.org/cmake/help/latest/policy/CMP0063.html
33-
# cmake_policy(SET CMP0063 NEW)
34-
35-
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
36-
# Changes how timestamps of downloaded files with
37-
# ExternalProject_Add() are set.
38-
#
39-
# https://cmake.org/cmake/help/latest/policy/CMP0135.html
40-
cmake_policy(SET CMP0135 NEW)
41-
endif()
42-
43-
# Do not allow using GNU extensions (such as '-std=g++11'), because
44-
# it's not compatible with Maya.
45-
set(CXX_EXTENSIONS OFF)
46-
47-
# Project configuration.
48-
project(mmsolverlibs)
49-
set(PROJECT_VERSION_MAJOR 0)
50-
set(PROJECT_VERSION_MINOR 1)
51-
set(PROJECT_VERSION_PATCH 0)
52-
set(PROJECT_VERSION_TWEAK 0)
53-
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}")
54-
set(PROJECT_HOMEPAGE_URL "https://github.com/david-cattermole/mayaMatchMoveSolver")
55-
set(PROJECT_DESCRIPTION "mmSolver libraries.")
56-
set(PROJECT_AUTHOR "David Cattermole")
57-
set(PROJECT_COPYRIGHT "2023, 2024, David Cattermole.")
58-
5922
# TODO: This relies on the '${mmsolverlibs_rust_DIR}' variable being set,
6023
# which is not ideal at all. Instead this should be a default value
6124
# (such as "/path/to/rust/build/directory/").
@@ -116,6 +79,3 @@ if (MMSOLVERLIBS_BUILD_TESTS)
11679
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cppbind/mmimage/tests)
11780
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cppbind/mmscenegraph/tests)
11881
endif()
119-
120-
include(MMCommonUtils)
121-
mm_common_add_install_target("mmsolverlibs_cpp" ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in)

lib/cppbind/mmimage/tests/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,3 @@ target_include_directories(${target_test_exe_name}
5555
include(MMColorIOUtils)
5656
mmcolorio_find_packages()
5757
mmcolorio_target_link_packages(${target_test_exe_name})
58-
59-
install(TARGETS ${target_test_exe_name})

lib/cppbind/mmlens/tests/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,3 @@ target_include_directories(${target_test_exe_name}
6363
include(MMColorIOUtils)
6464
mmcolorio_find_packages()
6565
mmcolorio_target_link_packages(${target_test_exe_name})
66-
67-
install(TARGETS ${target_test_exe_name})

lib/cppbind/mmscenegraph/tests/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,3 @@ target_include_directories(${target_test_exe_name}
5252
include(MMColorIOUtils)
5353
mmcolorio_find_packages()
5454
mmcolorio_target_link_packages(${target_test_exe_name})
55-
56-
install(TARGETS ${target_test_exe_name})

lib/mmsolverlibs/src/CMakeLists.txt

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,12 @@ target_link_libraries(${cpp_lib_name}
120120
# ldpk to be installed so we have the 'ldpk_INCLUDE_DIR' variable.
121121
add_dependencies(${cpp_lib_name} ldpk::ldpk)
122122

123-
# Link cminpack dependency
123+
# Add dependencies.
124124
target_link_libraries(${cpp_lib_name}
125-
PUBLIC cminpack::cminpack
126-
)
127-
128-
# Link OpenMVG dependency for SFM functions
129-
target_link_libraries(${cpp_lib_name}
130-
PUBLIC openMVG
125+
PUBLIC cminpack::cminpack # for small/medium optimization problems.
126+
PUBLIC openMVG # for SFM functions.
127+
PUBLIC glog::glog # required by Ceres for logging.
128+
PUBLIC ceres::ceres # for large scale optimization problems.
131129
)
132130

133131
# MM Color IO dependencies
@@ -147,18 +145,3 @@ target_include_directories(${cpp_lib_name}
147145
PRIVATE $<BUILD_INTERFACE:${ldpk_INCLUDE_DIR}>
148146
PUBLIC $<INSTALL_INTERFACE:include/>
149147
)
150-
151-
# Install public headers
152-
include(GNUInstallDirs)
153-
install(DIRECTORY
154-
"${mmcolorio_include_dir}/"
155-
"${mmcore_include_dir}/"
156-
"${mmimage_include_dir}/"
157-
"${mmlens_include_dir}/"
158-
"${mmscenegraph_include_dir}/"
159-
"${main_include_dir}/"
160-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
161-
FILES_MATCHING PATTERN "*.h")
162-
163-
mm_common_install_target_library("mmsolverlibs_cpp" ${cpp_lib_name})
164-

lib/thirdparty/ceres/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -247,19 +247,3 @@ target_link_libraries(ceres PUBLIC
247247

248248
# Create an alias to match the expected target name from FindCeres
249249
add_library(ceres::ceres ALIAS ceres)
250-
251-
# Install headers (public API)
252-
install(DIRECTORY include/ceres
253-
DESTINATION include
254-
FILES_MATCHING PATTERN "*.h"
255-
)
256-
257-
# Install the static config.h (required by internal headers)
258-
install(FILES ${CERES_CONFIG_OUTPUT_DIR}/ceres/internal/config.h
259-
DESTINATION include/ceres/internal
260-
)
261-
262-
# Install the library as part of mmsolverlibs
263-
# Note: The following is only used when building as part of mmSolver
264-
include(MMCommonUtils)
265-
mm_common_install_target_library("mmsolverlibs_cpp" ceres)

lib/thirdparty/ceres/internal/ceres/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,6 @@ else (BUILD_SHARED_LIBS)
253253
target_link_libraries(ceres ${CERES_LIBRARY_DEPENDENCIES})
254254
endif (BUILD_SHARED_LIBS)
255255

256-
install(TARGETS ceres
257-
EXPORT CeresExport
258-
RUNTIME DESTINATION bin
259-
LIBRARY DESTINATION lib${LIB_SUFFIX}
260-
ARCHIVE DESTINATION lib${LIB_SUFFIX})
261-
262256
if (BUILD_TESTING AND GFLAGS)
263257
add_library(gtest gmock_gtest_all.cc gmock_main.cc)
264258
if (BUILD_SHARED_LIBS)

lib/thirdparty/cminpack/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,3 @@ endif()
9696

9797
# Create an alias to match the expected target name
9898
add_library(cminpack::cminpack ALIAS cminpack_s)
99-
100-
# Install headers
101-
install(FILES
102-
cminpack.h
103-
minpack.h
104-
DESTINATION include/cminpack-1
105-
)
106-
107-
# Install the library as part of mmsolverlibs
108-
include(MMCommonUtils)
109-
mm_common_install_target_library("mmsolverlibs_cpp" cminpack_s)

lib/thirdparty/eigen/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,3 @@ if(TARGET Eigen3)
8383
)
8484
endif()
8585
endif()
86-
87-
# Install Eigen headers - now properly organized in Eigen subdirectory
88-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Eigen/
89-
DESTINATION include/Eigen
90-
FILES_MATCHING PATTERN "*" PATTERN "*.h" PATTERN "*.hpp")
91-
92-
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/unsupported
93-
DESTINATION include
94-
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
95-
96-
# Install Eigen targets
97-
include(MMCommonUtils)
98-
mm_common_install_target_library("mmsolverlibs_cpp" eigen)
99-
# Note: Eigen3 target is exported early in the main CMakeLists.txt to resolve dependency ordering

lib/thirdparty/glog/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,5 @@ set_target_properties(glog PROPERTIES
154154
OUTPUT_NAME glog
155155
)
156156

157-
# Install the library and headers for integration with the main build
158-
install(TARGETS glog
159-
EXPORT mmsolverlibs_cppTargets
160-
ARCHIVE DESTINATION lib
161-
LIBRARY DESTINATION lib
162-
RUNTIME DESTINATION bin
163-
INCLUDES DESTINATION include
164-
)
165-
166-
# Install headers
167-
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/glog
168-
DESTINATION include
169-
FILES_MATCHING PATTERN "*.h"
170-
)
171-
172157
message(STATUS "glog: Version ${GLOG_VERSION} (vendored)")
173158

0 commit comments

Comments
 (0)