Fix some cmake build system issues (#6147)

* [cmake] Switch to find_package for TIFF
- Included in cmake 3.5 and later
- Provides better configuration messages
* Add missing TIFF library to rtgui and rtexif
* Removed unnecessary quotes so that cmake sees the list as a list
* Add OpenMP to rtengine if OpenMP is enabled
This commit is contained in:
Stefan Wunsch
2021-03-01 16:40:54 +01:00
committed by GitHub
parent cf21bd87d5
commit 68a6e02369
4 changed files with 17 additions and 5 deletions

View File

@@ -57,6 +57,10 @@ link_directories("${PROJECT_SOURCE_DIR}/rtexif"
"${RSVG_LIBRARY_DIRS}"
)
if(OpenMP_FOUND)
include_directories(${OpenMP_CXX_INCLUDE_DIRS})
endif()
set(CAMCONSTSFILE "camconst.json")
set(RTENGINESOURCEFILES
@@ -223,4 +227,8 @@ target_link_libraries(rtengine rtexif
${KLT_LIBRARIES}
)
if(OpenMP_FOUND)
target_link_libraries(rtengine ${OpenMP_CXX_LIBRARIES})
endif()
install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)