##// END OF EJS Templates
Remove cmake function called that isn't necessary and makes failed the configuration test if test is enable
Remove cmake function called that isn't necessary and makes failed the configuration test if test is enable

File last commit:

r257:40b3607afb8e
r1069:6684c2bc54eb
Show More
sciqlop_params.cmake
128 lines | 4.1 KiB | text/x-cmake | CMakeLexer
/ cmake / sciqlop_params.cmake
Initialisation de l'archi cmake
r0 #
# sciqlop_params : Define compilation parameters
#
# Debug or release
#
# As the "NMake Makefiles" forces by default the CMAKE_BUILD_TYPE variable to Debug, SCIQLOP_BUILD_TYPE variable is used to be sure that the debug mode is a user choice
Initialisation de l'application multithread avec le spimpl....
r21 #SET(SCIQLOP_BUILD_TYPE "Release" CACHE STRING "Choose to compile in Debug or Release mode")
Initialisation de l'archi cmake
r0
Prise en compte du suffix des binaires en fonction du BUILD_TYPE
r26 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
SET (DEBUG_SUFFIX "d")
ELSE()
MESSAGE (STATUS "Build in Release")
SET (DEBUG_SUFFIX "")
ENDIF()
Initialisation de l'archi cmake
r0 #
# Need to compile tests?
#
OPTION (BUILD_TESTS "Build the tests" OFF)
ENABLE_TESTING(${BUILD_TESTS})
#
# Path to the folder for sciqlop's extern libraries.
#
# When looking for an external library in sciqlop, we look to the following
# folders:
# - The specific folder for the library (generally of the form <LIBRARY>_ROOT_DIR
# - The global Sciqlop extern folder
# - The system folders.
#
# If a dependency is found in the global extern folder or a specific folder for
# the library, then it is installed with the sciqlop libraries. If it is found
# in the system folders, it is not. This behavior can be overriden with the
# <LIBRARY>_COPY_SHARED_LIBRARIES flag.
#
set(SCIQLOP_EXTERN_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/extern"
CACHE PATH "Path to the folder for sciqlop's extern libraries")
option(SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR "Force the <LIBRARY>_ROOT_DIR to be updated to the global sciqlop extern folder"
OFF)
if (SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR)
set(libRootDirForceValue FORCE)
else()
set(libRootDirForceValue)
endif()
Configuration update to permit make install on linux
r257 #
# Sciqlop_modules.cmake
#
# Set ouptut directories
#
IF (UNIX)
# 32 or 64 bits compiler
IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
SET(defaultLib "lib64/sciqlop")
ELSE()
SET(defaultLib "lib/sciqlop")
ENDIF()
SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${defaultLib})
ELSEIF(WIN32)
SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
SET (CONFIG_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/app/QtProject)
ELSE()
SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
ENDIF()
Initialisation de l'archi cmake
r0
#
# Static or shared libraries
#
OPTION (BUILD_SHARED_LIBS "Build the shared libraries" ON)
# Generate position independant code (-fPIC)
SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
Configuration update to permit make install on linux
r257
# Configuration for make install
set(PROJECT_PLUGIN_PREFIX "SciQlop")
Initialisation de l'archi cmake
r0 IF (UNIX)
Configuration update to permit make install on linux
r257 SET(CMAKE_INSTALL_PREFIX "/usr/local/${PROJECT_PLUGIN_PREFIX}")
Initialisation de l'archi cmake
r0 SET(defaultBin "bin")
SET(defaultInc "include/sciqlop")
# 32 or 64 bits compiler
IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
Configuration update to permit make install on linux
r257 SET(defaultLib "lib64")
SET(defaultPluginsLib "lib64/${PROJECT_PLUGIN_PREFIX}")
Initialisation de l'archi cmake
r0 ELSE()
Configuration update to permit make install on linux
r257 SET(defaultLib "lib/")
SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
Initialisation de l'archi cmake
r0 ENDIF()
Configuration update to permit make install on linux
r257 SET(defaultDoc "share/docs/${PROJECT_PLUGIN_PREFIX}")
Initialisation de l'archi cmake
r0 ELSE()
SET(defaultBin "bin")
Configuration update to permit make install on linux
r257 SET(defaultInc "include/${PROJECT_PLUGIN_PREFIX}")
SET(defaultLib "lib")
SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
SET(defaultDoc "docs/${PROJECT_PLUGIN_PREFIX}")
Initialisation de l'archi cmake
r0 ENDIF()
SET(INSTALL_BINARY_DIR "${defaultBin}" CACHE STRING
"Installation directory for binaries")
SET(INSTALL_LIBRARY_DIR "${defaultLib}" CACHE STRING
"Installation directory for libraries")
Configuration update to permit make install on linux
r257 SET(INSTALL_PLUGINS_LIBRARY_DIR "${defaultPluginsLib}" CACHE STRING
"Installation directory for libraries")
Initialisation de l'archi cmake
r0 SET(INSTALL_INCLUDE_DIR "${defaultInc}" CACHE STRING
"Installation directory for headers")
SET(INSTALL_DOCUMENTATION_DIR "${defaultDoc}" CACHE STRING
"Installation directory for documentations")
Configuration update to permit make install on linux
r257
# Set the rpath when installing
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
message("Install RPATH: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")