File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,3 +116,6 @@ if (MMSOLVERLIBS_BUILD_TESTS)
116116 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR } /cppbind/mmimage/tests )
117117 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR } /cppbind/mmscenegraph/tests )
118118endif ()
119+
120+ include (MMCommonUtils )
121+ mm_common_add_install_target ("mmsolverlibs_cpp" ${CMAKE_CURRENT_SOURCE_DIR } /Config.cmake.in )
Original file line number Diff line number Diff line change @@ -147,3 +147,18 @@ target_include_directories(${cpp_lib_name}
147147 PRIVATE $<BUILD_INTERFACE :${ldpk_INCLUDE_DIR} >
148148 PUBLIC $<INSTALL_INTERFACE :include />
149149 )
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+
Original file line number Diff line number Diff line change @@ -247,3 +247,19 @@ target_link_libraries(ceres PUBLIC
247247
248248# Create an alias to match the expected target name from FindCeres
249249add_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 )
Original file line number Diff line number Diff line change @@ -96,3 +96,14 @@ endif()
9696
9797# Create an alias to match the expected target name
9898add_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 )
Original file line number Diff line number Diff line change @@ -83,3 +83,17 @@ if(TARGET Eigen3)
8383 )
8484 endif ()
8585endif ()
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
Original file line number Diff line number Diff line change @@ -154,4 +154,20 @@ 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+
157172message (STATUS "glog: Version ${GLOG_VERSION} (vendored)" )
173+
Original file line number Diff line number Diff line change @@ -105,3 +105,17 @@ if(MSVC)
105105 set_target_properties (openMVG PROPERTIES COMPILE_FLAGS "/bigobj" )
106106 target_compile_options (openMVG PUBLIC "-D_USE_MATH_DEFINES" )
107107endif ()
108+
109+ # Install OpenMVG headers and template implementation files.
110+ install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR } /../openMVG/
111+ DESTINATION include/openMVG
112+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.cpp" )
113+
114+ # Install OpenMVG third_party dependencies.
115+ install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR } /../third_party/
116+ DESTINATION include/third_party
117+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.cpp" )
118+
119+ # Install OpenMVG as part of mmsolverlibs.
120+ include (MMCommonUtils )
121+ mm_common_install_target_library ("mmsolverlibs_cpp" openMVG )
You can’t perform that action at this time.
0 commit comments