File build-fixes.patch of Package phd2
diff -ru orig/cmake_modules/PHD2Packaging.cmake mod/cmake_modules/PHD2Packaging.cmake
--- orig/cmake_modules/PHD2Packaging.cmake 2024-07-31 05:59:39.000000000 +0200
+++ mod/cmake_modules/PHD2Packaging.cmake 2024-08-05 08:38:18.420018923 +0200
@@ -73,12 +73,12 @@
RENAME phd2)
install(FILES ${PHD_INSTALL_LIBS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/phd2/)
- install(FILES ${phd_src_dir}/icons/phd2_48.png
+ install(FILES icons/phd2_256.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps/
RENAME "phd2.png")
- install(FILES ${phd_src_dir}/phd2.desktop
+ install(FILES phd2.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/ )
- install(FILES ${phd_src_dir}/phd2.appdata.xml
+ install(FILES phd2.appdata.xml
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/ )
# Make Debian package
diff -ru orig/src/cam_ogma.cpp mod/src/cam_ogma.cpp
--- orig/src/cam_ogma.cpp 2024-07-31 05:59:39.000000000 +0200
+++ mod/src/cam_ogma.cpp 2024-08-05 08:30:58.317164195 +0200
@@ -37,7 +37,7 @@
#if defined(OGMA_CAMERA)
# include "cam_ogma.h"
-# include "ogmacam.h"
+#include <libogmacam/ogmacam.h>
// Touptek API uses these Windows definitions even on non-Windows platforms
# ifndef S_OK
diff -ru orig/thirdparty/thirdparty.cmake mod/thirdparty/thirdparty.cmake
--- orig/thirdparty/thirdparty.cmake 2024-07-31 05:59:39.000000000 +0200
+++ mod/thirdparty/thirdparty.cmake 2024-08-05 08:30:58.320497550 +0200
@@ -715,21 +715,6 @@
)
endif()
-if (NOT OPENSOURCE_ONLY)
- include(FetchContent)
- FetchContent_Declare(
- OGMAcamSDK
- GIT_REPOSITORY https://github.com/OGMAvision/OGMAcamSDK.git
- GIT_TAG 4314639b289636425821d0bb4d47aa3d652e790e
- )
- FetchContent_MakeAvailable(OGMAcamSDK)
- include_directories(${ogmacamsdk_SOURCE_DIR}/inc)
- if (WIN32)
- list(APPEND PHD_LINK_EXTERNAL ${ogmacamsdk_SOURCE_DIR}/win/x86/ogmacam.lib)
- list(APPEND PHD_COPY_EXTERNAL_ALL ${ogmacamsdk_SOURCE_DIR}/win/x86/ogmacam.dll)
- endif()
-endif()
-
# Various camera libraries
if(WIN32)
# Video for Windows, directshow and windows media
@@ -1009,9 +994,7 @@
# when building for FreeBSD.
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
find_library(asiCamera2
- NAMES ASICamera2
- NO_DEFAULT_PATHS
- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/zwolibs/${zwoarch})
+ NAMES ASICamera2)
if(NOT asiCamera2)
message(FATAL_ERROR "Cannot find the asiCamera2 drivers")
@@ -1021,10 +1004,8 @@
set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${asiCamera2})
find_library(toupcam
- NAMES toupcam
- NO_DEFAULT_PATHS
- NO_CMAKE_SYSTEM_PATH
- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/toupcam/linux/${toupcam_arch})
+ NAMES toupcam)
+
if(NOT toupcam)
message(FATAL_ERROR "Cannot find the toupcam drivers")
endif()
@@ -1034,10 +1015,8 @@
set(PHD_INSTALL_LIBS ${PHD_INSTALL_LIBS} ${toupcam})
find_library(ogmacam
- NAMES ogmacam
- NO_DEFAULT_PATHS
- NO_CMAKE_SYSTEM_PATH
- PATHS ${ogmacamsdk_SOURCE_DIR}/linux/${toupcam_arch})
+ NAMES ogmacam)
+
if(NOT ogmacam)
message(FATAL_ERROR "Cannot find the ogmacam drivers")
endif()
@@ -1047,9 +1026,7 @@
set(PHD_INSTALL_LIBS ${PHD_INSTALL_LIBS} ${ogmacam})
find_library(SVBCameraSDK
- NAMES SVBCameraSDK
- NO_DEFAULT_PATHS
- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/svblibs/linux/${svbony_arch})
+ NAMES SVBCameraSDK)
if(NOT SVBCameraSDK)
message(FATAL_ERROR "Cannot find the SVBCameraSDK drivers")
@@ -1059,19 +1036,15 @@
set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${SVBCameraSDK})
set(PHD_INSTALL_LIBS ${PHD_INSTALL_LIBS} ${SVBCameraSDK})
- if(IS_DIRECTORY ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch})
- add_definitions(-DHAVE_QHY_CAMERA=1)
-
- # be careful not to pick up any other qhy lib on the system
- find_library(qhylib
- NAMES qhyccd
- NO_DEFAULT_PATH
- PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/qhyccdlibs/linux/${qhyarch})
- if(NOT qhylib)
- message(FATAL_ERROR "Cannot find the qhy SDK libs")
- endif()
- set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib})
+ find_library(qhylib
+ NAMES qhyccd)
+ if(NOT qhylib)
+ message(FATAL_ERROR "Cannot find the qhy SDK libs")
endif()
+ message(STATUS "Found QHY lib ${qhylib}")
+ add_definitions(-DHAVE_QHY_CAMERA=1)
+ set(PHD_LINK_EXTERNAL ${PHD_LINK_EXTERNAL} ${qhylib})
+
endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
find_program(LSB_RELEASE_EXEC lsb_release)