mirror of
https://github.com/eddyem/CCD_Capture.git
synced 2026-03-20 00:31:04 +03:00
convert to new cmake
This commit is contained in:
@@ -6,9 +6,10 @@ find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(${CCDLIB} REQUIRED fli>=1.71 usefull_macros)
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC)
|
||||
include_directories(${${CCDLIB}_INCLUDE_DIRS} ..)
|
||||
link_directories(${${CCDLIB}_LIBRARY_DIRS})
|
||||
|
||||
add_library(${CCDLIB} SHARED ${SRC})
|
||||
|
||||
target_include_directories(${CCDLIB} PRIVATE ${${CCDLIB}_INCLUDE_DIRS} ..)
|
||||
target_link_directories(${CCDLIB} PRIVATE ${${CCDLIB}_LIBRARY_DIRS})
|
||||
|
||||
target_link_libraries(${CCDLIB} ${${CCDLIB}_LIBRARIES} -fPIC)
|
||||
install(TARGETS ${CCDLIB} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
@@ -141,7 +141,7 @@ static int fli_findCCD(){
|
||||
return TRUE;
|
||||
}
|
||||
static int fli_setActiceCam(int n){
|
||||
DBG("SET ACTUIVE #%d", n);
|
||||
DBG("SET ACTIVE #%d", n);
|
||||
if(!camz && !fli_findCCD()) return FALSE;
|
||||
if(n >= camera.Ndevices){
|
||||
return FALSE;
|
||||
@@ -463,7 +463,9 @@ retn:
|
||||
static int fli_capt(cc_IMG *ima){
|
||||
if(!ima || !ima->data) return FALSE;
|
||||
for(int row = 0; row < ima->h; row++){
|
||||
void *ptr = (void*)((is16bit) ? ((uint16_t*)ima->data) + row * ima->w : ((uint8_t*)ima->data) + row * ima->w);
|
||||
void *ptr = NULL;
|
||||
if(is16bit) ptr = (void*)(((uint16_t*)ima->data) + row * ima->w);
|
||||
else ptr = (void*)(((uint8_t*)ima->data) + row * ima->w);
|
||||
TRYFUNC(FLIGrabRow, camdev, ptr, ima->w);
|
||||
if(fli_err) return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user