Skip to content

Commit

Permalink
Fix installation of headers
Browse files Browse the repository at this point in the history
- fix bug where an extraneous level was created
- do not install empty directories
  • Loading branch information
rserban committed Feb 11, 2021
1 parent b024e5f commit 4e762ba
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
25 changes: 14 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -563,45 +563,48 @@ endif()
#------------------------------------------------------------

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/filesystem
DESTINATION include/chrono_thirdparty/filesystem
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/cxxopts
DESTINATION include/chrono_thirdparty/cxxopts
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/HACD
DESTINATION include/chrono_thirdparty/HACD
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/HACDv2
DESTINATION include/chrono_thirdparty/HACDv2
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/rapidjson
DESTINATION include/chrono_thirdparty/rapidjson
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/rapidxml
DESTINATION include/chrono_thirdparty/rapidxml
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/tinyobjloader
DESTINATION include/chrono_thirdparty/tinyobjloader
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/yafel
DESTINATION include/chrono_thirdparty/yafel
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

if(BUILD_TESTING)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/googletest
DESTINATION include/chrono_thirdparty/googletest
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/googletest/googletest/include
DESTINATION include/chrono_thirdparty/googletest/googletest
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/googletest/googlemock/include
DESTINATION include/chrono_thirdparty/googletest/googlemock
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
endif()

if(BUILD_BENCHMARKING)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/googlebenchmark
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/googlebenchmark/include
DESTINATION include/chrono_thirdparty/googlebenchmark
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/chrono_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,5 @@ message(STATUS "NVCC Flags are " ${CUDA_NVCC_FLAGS})

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/cub
DESTINATION include/chrono_thirdparty/cub
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
4 changes: 2 additions & 2 deletions src/chrono_multicore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,11 @@ ENDIF()

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/easylogging
DESTINATION include/chrono_thirdparty/easylogging
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

if(USE_MULTICORE_CUDA)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/cub
DESTINATION include/chrono_thirdparty/cub
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
endif()
7 changes: 6 additions & 1 deletion src/chrono_opengl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ INSTALL(TARGETS ChronoEngine_opengl

INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION include/chrono_opengl
FILES_MATCHING PATTERN "*.h")
FILES_MATCHING PATTERN "*.h" PATTERN "resources" EXCLUDE)

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/tinyobjloader
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

#-------------------------------------------------------------------------------
# On Windows, copy the GLEW and GLFW DLLs (if specified)
Expand Down
2 changes: 1 addition & 1 deletion src/chrono_sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -515,5 +515,5 @@ install(FILES ${ChronoEngine_sensor_SCENE_HEADERS}

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/stb
DESTINATION include/chrono_thirdparty/stb
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
4 changes: 2 additions & 2 deletions src/chrono_synchrono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ install(TARGETS ChronoEngine_synchrono

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION include/chrono_synchrono
FILES_MATCHING PATTERN "*.h")
FILES_MATCHING PATTERN "*.h" PATTERN "fbs" EXCLUDE)

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/flatbuffers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/flatbuffers/include
DESTINATION include/chrono_thirdparty/flatbuffers
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")
4 changes: 2 additions & 2 deletions src/chrono_vehicle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -934,11 +934,11 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/

# Install required chrono_thirdparty headers
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/Easy_BMP
DESTINATION include/chrono_thirdparty/Easy_BMP
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/chrono_thirdparty/stb
DESTINATION include/chrono_thirdparty/stb
DESTINATION include/chrono_thirdparty
FILES_MATCHING PATTERN "*.h" PATTERN "*.cuh" PATTERN "*.hpp" PATTERN "*.inl")

#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 4e762ba

Please sign in to comment.