Skip to content
Snippets Groups Projects
Commit 0379169b authored by Sanchez Alexandre's avatar Sanchez Alexandre
Browse files

Fix compilation on Linux

Please, try to avoid absolute path fix on windows
parent 9701477e
No related branches found
No related tags found
No related merge requests found
......@@ -35,3 +35,6 @@
moc_*.cpp
Makefile
CMakeLists.txt.user*
##Build dir
build
\ No newline at end of file
project(ImageINSA)
cmake_minimum_required(VERSION 2.8.11)
#set(CMAKE_BUILD_TYPE "Debug")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
#Modif Pazat : repertoire contenant les fichiers de configuration .cmake pour QT5. !!! Modifier le chemin pour qu'il dépende des variables d'environnement !!!
#set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.6.1\\5.6\\msvc2015_64\\lib\\cmake\\")
#Modif Pazat : repertoire contenant les fichiers de configuration .cmake pour QT5.
set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.6.1\\5.6\\mingw49_32\\lib\\cmake")
# Find the Qt libraries
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
......@@ -31,8 +24,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY})
set (CMAKE_PREFIX_PATH "C:\\RandomLib-mingw32")
# Find RandomLib, which must be built and installed before running this compilation
find_package(RandomLib 1.7 REQUIRED)
if(RandomLib_FOUND)
......@@ -54,10 +45,6 @@ else()
"for Detiq-T (ImageIn & GenericInterface libraries), and re-run CMake.")
endif()
set (CMAKE_MODULE_PATH "C:\\Program Files\\CMake\\share\\cmake-3.6\\Modules\\")
set (CMAKE_PREFIX_PATH "C:\\Program Files (x86)\\GnuWin32\\")
find_package(JPEG)
if(JPEG_FOUND)
include_directories(${JPEG_INCLUDE_DIR})
......@@ -76,14 +63,8 @@ find_package(Threads REQUIRED)
# Simple inclusion, more control have already been performed
# in previous Detiq-T lookup (GenericInterface)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
set(CMAKE_PREFIX_PATH "C:\\Qt\\Qwt-6.1.2\\")
set(QWT_LIBRARY "C:\\Qt\\Qwt-6.1.2\\lib\\qwt.dll")
set(QWT_INCLUDE_DIR "C:\\Qt\\Qwt-6.1.2\\include")
find_package(Qwt 6.0 REQUIRED)
include_directories(${QWT_INCLUDE_DIRS})
find_package(Qwt 6.0)
include_directories(${QWT_INCLUDE_DIRS})
add_subdirectory(core)
include_directories(core)
......
File moved
File moved
File moved
......@@ -42,11 +42,13 @@
# either expressed or implied, of the FreeBSD Project.
#=============================================================================
FILE(GLOB Qwt6_GLOB_PATH /usr/qwt* /usr/local/qwt* /usr/include/qwt* /usr/lib/qt4/include/qwt* /usr/lib64/qt4/include/qwt* )
find_path ( QWT_INCLUDE_DIR
NAMES qwt_plot.h
PATHS ${QT_INCLUDE_DIR} ${Qwt6_GLOB_PATH}
HINTS ${QT_INCLUDE_DIR}
PATH_SUFFIXES qwt qwt-qt3 qwt-qt4 qwt-qt5
PATH_SUFFIXES include
)
set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
......@@ -81,7 +83,8 @@ endif ()
find_library ( QWT_LIBRARY
NAMES qwt qwt-qt3 qwt-qt4 qwt-qt5
HINTS ${QT_LIBRARY_DIR}
HINTS ${QT_LIBRARY_DIR} ${Qwt6_GLOB_PATH}
PATH_SUFFIXES lib
)
set ( QWT_LIBRARIES ${QWT_LIBRARY} )
......
find_package(Qt5Widgets REQUIRED)
set(CMAKE_PREFIX_PATH "C:\\Qt\\Qwt-6.1.2\\")
#set(QWT_LIBRARY "C:\\Qwt-6.1.2\\lib\\qwt.dll")
set(QWT_LIBRARY C:/Qt/Qwt-6.1.2/lib/qwt.dll)
set(QWT_INCLUDE_DIR "C:\\Qt\\Qwt-6.1.2\\include")
find_package(Qwt 6.0 REQUIRED)
if(QWT_FOUND)
include_directories(${QWT_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Cannot find Qwt library. Please add the Qwt library directory to CMAKE_PREFIX_PATH.")
endif()
set(SRCS
BuiltinOpSet.cpp
BuiltinOpSet.h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment