-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (28 loc) · 1.21 KB
/
CMakeLists.txt
File metadata and controls
34 lines (28 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_LIST_DIR)
cmake_minimum_required(VERSION 3.6)
# set the platform
option(BUILD_LINUX "Build samples for running on Linux x86_64" ON)
option(BUILD_ARM "Build samples for running on ARM x86" OFF)
option(BUILD_ARM64 "Build samples for running on ARM x64" OFF)
if(BUILD_LINUX)
set(DBRLIB ../../../../lib/Linux)
elseif(BUILD_ARM)
set(DBRLIB ../../../../lib/ARM32)
add_compile_options(-DDM_ARM -D__ARM_NEON__ -mfpu=neon)
elseif(BUILD_ARM64)
set(DBRLIB ../../../../lib/ARM64)
add_compile_options(-DDM_ARM -D__ARM_NEON__)
else()
message(FATAL_ERROR "Please specify a supported platform")
endif()
set (CMAKE_CXX_STANDARD 11)
add_compile_options(-O2 -fPIC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -fvisibility=hidden -fvisibility-inlines-hidden -L ${DBRLIB} -Wl,-rpath,${DBRLIB} -Wl,-rpath,'$ORIGIN' -static-libgcc -static-libstdc++ -s")
endif()
project(ReadDPMBarcode)
file(GLOB FILE_SRCS
ReadDPMBarcode.cpp
)
add_executable(ReadDPMBarcode ${FILE_SRCS})
set_target_properties(ReadDPMBarcode PROPERTIES SKIP_BUILD_RPATH TRUE)
target_link_libraries(ReadDPMBarcode DynamsoftBarcodeReader)