summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-02-21 07:27:00 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-02-21 07:27:00 +0100
commitd12498504c279a0a85bbfb024f7903e34dbe07db (patch)
tree0df9f3f8bf27470ac211a57bb8e44be0aa2f6138 /CMakeLists.txt
parent27637ab117d8738236f6ab155300ff6e79e4843b (diff)
broken img calc; change dir struct
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt49
1 files changed, 14 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01bf27f..8826e5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC OFF)
# set(TARGET_SYSROOT /home/nikita/rpi/rpi-sysroot)
@@ -27,6 +27,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${TARGET_SYSROOT}/usr/include")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
+# NOTE: in case of header issues during inno-maker driver compilation - try to
+# reinstall linux-headers-<your exact running kernel version here>, like this
+# sudo apt install linux-headers-6.6.74+rpt-rpi-v8 --reinstall
# NOTE: on your rpi you'll need to install
# libcamera-dev, libcamera-ipa (TODO: check if ipa is needed)
@@ -61,6 +64,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
#
# export this path for qtcreator:
# LD_LIBRARY_PATH=/home/nikita/rpi/rpi-sysroot/usr/lib/aarch64-linux-gnu/:$LD_LIBRARY_PATH
+set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}/usr)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
@@ -97,40 +101,15 @@ find_package(TBB REQUIRED)
qt_standard_project_setup(REQUIRES 6.4)
-include_directories(. "${CAMERA_INCLUDE_DIRS}" src)
+include_directories("${CAMERA_INCLUDE_DIRS}" src)
# libpistache
pkg_check_modules(Pistache REQUIRED IMPORTED_TARGET libpistache)
# add_executable(${PROJECT_NAME}
-qt_add_executable(apporpheus
- httpservice.h
- httpservice.cpp
- imagealgos.h
- imagealgos.cpp
- macro.h
- main.cpp
- LibCamera.h
- LibCamera.cpp
- genetic_algos.h
- genetic_algos.cpp
- rotaryencoder.h
- rotaryencoder.cpp
- printerclient.h
- printerclient.cpp
- fuck_intel.h
- src/pixels.h src/pixels.cpp
- src/constants.h
- src/typedefs.h
- src/dumps.h src/dumps.cpp
- src/calibration.h src/calibration.cpp
- profile.h profile.cpp
- src/camera/ov9281.h src/camera/ov9281.cpp
- src/image.h src/image.cpp
- src/laser.h src/laser.cpp
- src/camera/innomakerov9281.h src/camera/innomakerov9281.cpp
- src/camera/icamera.h
-)
+file(GLOB_RECURSE SOURCES src/*.h src/*.cpp src/*.c src/*.qrc)
+message("sources: ${SOURCES}")
+qt_add_executable(apporpheus ${SOURCES})
target_link_libraries(app${PROJECT_NAME}
PRIVATE
"${LIBCAMERA_LIBRARIES}"
@@ -150,11 +129,11 @@ install(TARGETS app${PROJECT_NAME}
)
if ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- # message("it's Debug")
+ message("it's Release")
+ add_compile_options(-Ofast -fno-unroll-loops -Wall)
+ # add_compile_options(-Wall -Wextra -Wpedantic)
+ # add_compile_options(-O3 -Wall)
else()
- #message("it's not Debug")
+ message("it's not Release")
endif()
-
-# add_compile_options(-Wall -Wextra -Wpedantic)
-add_compile_options(-Ofast -fno-unroll-loops -Wall)