forked from indilib/indi-3rdparty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
1,697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project (libmeadecam) | ||
|
||
set (LIBMEADECAM_VERSION "1.0") | ||
set (LIBMEADECAM_SOVERSION "1") | ||
set (LIBMEADECAM_VERSION "56.25996") | ||
set (LIBMEADECAM_SOVERSION "56") | ||
|
||
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/") | ||
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/") | ||
find_package(USB1 REQUIRED) | ||
|
||
include (GNUInstallDirs) | ||
include (InstallImported) | ||
include(CMakeCommon) | ||
|
||
add_library (meadecam SHARED IMPORTED) | ||
|
||
set_target_properties (meadecam PROPERTIES VERSION ${LIBMEADECAM_VERSION} SOVERSION ${LIBMEADECAM_SOVERSION}) | ||
|
||
if (APPLE) | ||
|
||
set(meadecam_LIB_SRCS meadecam.c) | ||
add_library(meadecam SHARED ${meadecam_LIB_SRCS}) | ||
set_target_properties(meadecam PROPERTIES VERSION ${LIBMEADECAM_VERSION} SOVERSION ${LIBMEADECAM_SOVERSION}) | ||
target_link_libraries(meadecam ${USB1_LIBRARIES}) | ||
install(TARGETS meadecam LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
set_property (TARGET meadecam PROPERTY IMPORTED_LOCATION "mac/libmeadecam.bin") | ||
|
||
if (UNIX AND NOT APPLE) | ||
FIX_MACOS_LIBRARIES("libmeadecam" "mac/libmeadecam.bin" "MEADECAM") | ||
|
||
elseif (UNIX AND NOT WIN32) | ||
|
||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "armv+") | ||
set_property (TARGET meadecam PROPERTY IMPORTED_LOCATION "armhf/libmeadecam.bin") | ||
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") | ||
set_property (TARGET meadecam PROPERTY IMPORTED_LOCATION "arm64/libmeadecam.bin") | ||
elseif (CMAKE_SIZEOF_VOID_P MATCHES "8") | ||
set_property (TARGET meadecam PROPERTY IMPORTED_LOCATION "x64/libmeadecam.bin") | ||
else () | ||
message (FATAL_ERROR "unsupported architecture.") | ||
endif () | ||
|
||
# Install udev rules | ||
set (UDEVRULES_INSTALL_DIR "/lib/udev/rules.d" CACHE STRING "Base directory for udev rules") | ||
install (FILES 99-meadecam.rules DESTINATION ${UDEVRULES_INSTALL_DIR}) | ||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/99-meadecam.rules DESTINATION ${UDEVRULES_INSTALL_DIR}) | ||
|
||
endif () | ||
|
||
# Install header files | ||
install (FILES meadecam.h DESTINATION include/libmeadecam) | ||
|
||
# Install library | ||
install_imported (TARGETS meadecam DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,5 +80,5 @@ make DESTDIR=%{buildroot} install | |
|
||
|
||
%changelog | ||
* initial release 2022-05-27 | ||
* Touptek, xiangqianyong@hotmail.com | ||
|
Oops, something went wrong.