Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit c135a9c

Browse files
committed
do not install 3rd party header except eigen and gl
1 parent aa6ddc4 commit c135a9c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ endif ()
112112

113113
if (BUILD_JPEG)
114114
add_subdirectory(libjpeg)
115-
INSTALL_HEADERS(libjpeg)
116115
endif ()
117116

118117
# JSONCPP
@@ -138,7 +137,6 @@ else ()
138137

139138
if (BUILD_JSONCPP)
140139
add_subdirectory(jsoncpp)
141-
INSTALL_HEADERS(jsoncpp)
142140
endif ()
143141
endif ()
144142

@@ -159,8 +157,6 @@ endif ()
159157
if (BUILD_PNG)
160158
add_subdirectory(zlib)
161159
add_subdirectory(libpng)
162-
INSTALL_HEADERS(zlib)
163-
INSTALL_HEADERS(libpng)
164160
list(APPEND PNG_LIBRARIES zlib)
165161
endif ()
166162

@@ -186,7 +182,6 @@ if (BUILD_LIBREALSENSE)
186182
message(STATUS "Building LIBREALSENSE from source")
187183
add_subdirectory(librealsense)
188184
Directories("${CMAKE_CURRENT_SOURCE_DIR}/librealsense" librealsense_INCLUDE_DIRS)
189-
INSTALL_HEADERS(librealsense)
190185
endif ()
191186

192187
# tinyfiledialogs
@@ -195,7 +190,6 @@ if (BUILD_TINYFILEDIALOGS)
195190
add_subdirectory(tinyfiledialogs)
196191
set(tinyfiledialogs_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tinyfiledialogs")
197192
set(tinyfiledialogs_LIBRARIES tinyfiledialogs)
198-
INSTALL_HEADERS(tinyfiledialogs)
199193
else ()
200194
message(SEND_ERROR "TINYFILEDIALOGS dependency not met.")
201195
endif ()
@@ -219,6 +213,15 @@ list(APPEND 3RDPARTY_INCLUDE_DIRS
219213
${rply_INCLUDE_DIRS}
220214
${tinyfiledialogs_INCLUDE_DIRS})
221215

216+
# set 3RDPARTY_INCLUDE_DIRS_AT_INSTALL
217+
# Open3D's header only dependes on Eigen and GL headers
218+
# The future plan is to minimize such dependencies
219+
list(APPEND 3RDPARTY_INCLUDE_DIRS_AT_INSTALL
220+
${EIGEN3_INCLUDE_DIRS}
221+
${GLEW_INCLUDE_DIRS}
222+
${GLFW_INCLUDE_DIRS}
223+
)
224+
222225
# set 3RDPARTY_LIBRARY_DIRS
223226
list(APPEND 3RDPARTY_LIBRARY_DIRS
224227
${GLEW_LIBRARY_DIRS}
@@ -260,6 +263,7 @@ if (NOT BUILD_TINYFILEDIALOGS)
260263
endif ()
261264

262265
set(3RDPARTY_INCLUDE_DIRS ${3RDPARTY_INCLUDE_DIRS} PARENT_SCOPE)
266+
set(3RDPARTY_INCLUDE_DIRS_AT_INSTALL ${3RDPARTY_INCLUDE_DIRS_AT_INSTALL} PARENT_SCOPE)
263267
set(3RDPARTY_LIBRARY_DIRS ${3RDPARTY_LIBRARY_DIRS} PARENT_SCOPE)
264268
set(3RDPARTY_LIBRARIES ${3RDPARTY_LIBRARIES} PARENT_SCOPE)
265269
set(PRE_BUILT_3RDPARTY_LIBRARIES ${PRE_BUILT_3RDPARTY_LIBRARIES} PARENT_SCOPE)

0 commit comments

Comments
 (0)