|
@@ -1,21 +1,12 @@ |
|
|
cmake_minimum_required(VERSION 3.6) |
|
|
cmake_minimum_required(VERSION 3.6) |
|
|
project(platescan) |
|
|
project(platescan) |
|
|
|
|
|
|
|
|
set(OpenCV_DIR /usr/platescan/opencv-3.3.0/release/) |
|
|
|
|
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -O2 -std=c++11 -fpic -o") |
|
|
|
|
|
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |
|
|
|
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11) |
|
|
|
|
|
|
|
|
|
|
|
set(PHP_CONFIG_DIR /etc/php.d/) |
|
|
|
|
|
set(PHP_CONFIG php-config) |
|
|
|
|
|
set(POST_COMPILE_COMMAND systemctl restart php-fpm) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
|
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |
|
|
find_package(OpenCV 3.3.0 REQUIRED) |
|
|
find_package(OpenCV 3.3.0 REQUIRED) |
|
|
include_directories( ${OpenCV_INCLUDE_DIRS}) |
|
|
include_directories( ${OpenCV_INCLUDE_DIRS}) |
|
|
include_directories(include) |
|
|
include_directories(include) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library( # Sets the name of the library. |
|
|
add_library( # Sets the name of the library. |
|
|
platescan |
|
|
platescan |
|
|
|
|
|
|
|
@@ -42,7 +33,7 @@ target_link_libraries( |
|
|
${OpenCV_LIBS} |
|
|
${OpenCV_LIBS} |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
execute_process(COMMAND ${PHP_CONFIG} --extension-dir |
|
|
|
|
|
|
|
|
execute_process(COMMAND php-config --extension-dir |
|
|
OUTPUT_VARIABLE LIBRARY_DIR) |
|
|
OUTPUT_VARIABLE LIBRARY_DIR) |
|
|
|
|
|
|
|
|
message("Test ${LIBRARY_DIR} failed.") |
|
|
message("Test ${LIBRARY_DIR} failed.") |
|
|