From d7b9877631f360bf598a833ab7ee403a64ecf3ca Mon Sep 17 00:00:00 2001 From: hao Date: Mon, 2 Jul 2018 09:35:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=201.=20OpenCV=E5=8C=85=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E8=87=AA=E5=8A=A8=E4=BB=8E=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=AD=E8=AF=BB=E5=8F=96=202.=20=E7=BC=96=E8=AF=91=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E6=9C=89=E9=87=8D=E5=90=AFPHP=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E8=BF=99=E6=A0=B7=E5=BD=B1=E5=93=8D=E6=AF=94=E8=BE=83?= =?UTF-8?q?=E5=A4=A7=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Prj-PHP/CMakeLists.txt | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Prj-PHP/CMakeLists.txt b/Prj-PHP/CMakeLists.txt index 7116b24..53873d1 100644 --- a/Prj-PHP/CMakeLists.txt +++ b/Prj-PHP/CMakeLists.txt @@ -1,21 +1,12 @@ cmake_minimum_required(VERSION 3.6) 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) include_directories( ${OpenCV_INCLUDE_DIRS}) include_directories(include) - add_library( # Sets the name of the library. platescan @@ -42,7 +33,7 @@ target_link_libraries( ${OpenCV_LIBS} ) -execute_process(COMMAND ${PHP_CONFIG} --extension-dir +execute_process(COMMAND php-config --extension-dir OUTPUT_VARIABLE LIBRARY_DIR) message("Test ${LIBRARY_DIR} failed.")