| 1 |
|
| 2 |
SET (QT_USE_QTXML true) |
| 3 |
|
| •4 |
# Find includes in corresponding build directories |
| 5 |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
| 6 |
|
| •7 |
# Find the Qt5 libraries |
| 8 |
find_package(Qt5Widgets) |
| 9 |
find_package(Qt5Core) |
| 10 |
|
| 11 |
# Add the include directories for the Qt 5 Widgets module to |
| 12 |
# the compile lines. |
| 13 |
include_directories(${Qt5Widgets_INCLUDE_DIRS}) |
| 14 |
|
| 15 |
# Use the compile definitions defined in the Qt 5 Widgets module |
| 16 |
add_definitions(${Qt5Widgets_DEFINITIONS}) |
| 17 |
|
| 18 |
# Add compiler flags for building executables (-fPIE) |
| 19 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -fPIC") |
| 20 |
|
| 21 |
IF(WIN32) |
| 22 |
ADD_DEFINITIONS(-DMINGW32) |
| 23 |
ENDIF(WIN32) |
| 24 |
|
| 25 |
#INCLUDE_DIRECTORIES(X11_INCLUDE_DIR) |
| 26 |
# X11_FOUND is true if X11 is available. |
| 27 |
# * X11_INCLUDE_DIR contains the include directories to use X11. |
| 28 |
# * X11_LIBRARIES points to the libraries to link against to use X11. |
| 29 |
# Make sure the compiler can find include files from our Hello library. |
| 30 |
#include_directories (${X11_INCLUDE_DIR}) |
| 31 |
|
| 32 |
# -m -pthread FindThreads |
| 33 |
|
| 34 |
|
| 35 |
# Make sure the linker can find the Hello library once it is built. |
| 36 |
#link_directories (${X11_INCLUDE_DIR}) |
| 37 |
|
| 38 |
add_executable (populations populations.cpp distgnt.cpp jeupopexp.cpp fstat.cpp jeupop.cpp applpop.cpp applpopulations.cpp matrices.cpp applications.cpp |
| 39 |
arbre.cpp arbreplus.cpp couleur.cpp vecteurs.cpp locus.cpp allele.cpp individu.cpp strucpop.cpp chaineficpop.cpp metapop.cpp population.cpp) |
| 40 |
|
| 41 |
|
| 42 |
IF(WIN32) |
| 43 |
target_link_libraries (populations ${QT_LIBRARIES}) |
| 44 |
ELSE(WIN32) |
| •45 |
target_link_libraries (populations Qt5::Widgets Qt5::Core m) |
| 46 |
ENDIF(WIN32) |
| 47 |
|
| •48 |
|