WSL/SLF GitLab Repository

Commit 4140dfa5 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

The GSN plugin is now turned off by default (it was causing too much trouble...

The GSN plugin is now turned off by default (it was causing too much trouble with Windows and popc). Extra search paths have been added to FindPopc for convenience. FindMeteoIO can now test if POPC is defined and tweak the searched name accordingly; but since the search result is cached with something like
	SET(POPC_EXT "popc")
	SET(METEOIO_LIBRARY "METEOIO_LIBRARY-NOTFOUND" CACHE FILEPATH "Cleared." FORCE)
	FIND_PACKAGE(MeteoIO)
parent 6bf1578e
......@@ -125,7 +125,7 @@ SET(PLUGIN_COSMOXMLIO OFF CACHE BOOL "Compilation COSMOXMLIO ON or OFF")
SET(PLUGIN_GEOTOPIO ON CACHE BOOL "Compilation GEOTOPIO ON or OFF")
SET(PLUGIN_GRASSIO ON CACHE BOOL "Compilation GRASSIO ON or OFF")
SET(PLUGIN_GRIBIO OFF CACHE BOOL "Compilation GRIBIO ON or OFF")
SET(PLUGIN_GSNIO ON CACHE BOOL "Compilation GSNIO ON or OFF")
SET(PLUGIN_GSNIO OFF CACHE BOOL "Compilation GSNIO ON or OFF")
SET(PLUGIN_IMISIO OFF CACHE BOOL "Compilation IMISIO ON or OFF")
SET(PLUGIN_PGMIO ON CACHE BOOL "Compilation PGMIO ON or OFF")
SET(PLUGIN_PNGIO OFF CACHE BOOL "Compilation PNGIO ON or OFF")
......
......@@ -30,9 +30,12 @@ IF(WIN32)
)
ENDIF(MSVC)
ELSE(WIN32)
IF(POPC)
SET(POPC_EXT "popc")
ENDIF(POPC)
IF(APPLE)
FIND_LIBRARY(METEOIO_LIBRARY
NAMES meteoio
NAMES meteoio${POPC_EXT}
PATHS
"/Applications/MeteoIO/lib"
ENV LD_LIBRARY_PATH
......@@ -46,7 +49,7 @@ ELSE(WIN32)
)
ELSE(APPLE)
FIND_LIBRARY(METEOIO_LIBRARY
NAMES meteoio
NAMES meteoio${POPC_EXT}
PATHS
ENV LD_LIBRARY_PATH
"~/usr/lib"
......
INCLUDE(LibFindMacros)
# Finally the library itself
GET_FILENAME_COMPONENT(SRC_DIR ${CMAKE_SOURCE_DIR} PATH) #ie goes up one level
STRING(REPLACE " " "\\ " SRC_DIR ${SRC_DIR})
IF(WIN32)
MESSAGE("POPC is not supported under Windows!")
ELSE(WIN32)
IF(APPLE)
FIND_LIBRARY(METEOIO_LIBRARY
NAMES meteoiopopc
PATHS
"/Applications/MeteoIO/lib"
ENV LD_LIBRARY_PATH
ENV DYLD_FALLBACK_LIBRARY_PATH
"~/usr/lib"
"/usr/local/lib"
"/usr/lib"
"/opt/lib"
${SRC_DIR}/meteoio/lib
DOC "Location of the libmeteoio, like /usr/lib/libmeteoiopopc.dylib"
)
ELSE(APPLE)
FIND_LIBRARY(METEOIO_LIBRARY
NAMES meteoiopopc
PATHS
ENV LD_LIBRARY_PATH
"~/usr/lib"
"/usr/local/lib"
"/usr/lib"
"/opt/lib"
${SRC_DIR}/meteoio/lib
DOC "Location of the libmeteoio, like /usr/lib/libmeteoiopopc.so"
)
ENDIF(APPLE)
ENDIF(WIN32)
#build METEOIO_ROOT so we can provide a hint for searching for the header file
GET_FILENAME_COMPONENT(meteoio_libs_root ${METEOIO_LIBRARY} PATH)
SET(METEOIO_ROOT "${meteoio_libs_root}/../")
STRING(REPLACE " " "\\ " METEOIO_ROOT ${METEOIO_ROOT})
# locate main header file
FIND_PATH(METEOIO_INCLUDE_DIR
NAMES meteoio/MeteoIO.h
#HINTS ${METEOIO_ROOT}/include
PATHS
"${METEOIO_ROOT}/include"
"${METEOIO_ROOT}"
"~/usr/include"
"/usr/local/include"
"/usr/include"
"/opt/include"
DOC "Location of the meteoio headers, like /usr/include"
)
# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
SET(METEOIO_PROCESS_INCLUDES METEOIO_INCLUDE_DIR)
SET(METEOIO_PROCESS_LIBS METEOIO_LIBRARY)
libfind_process(METEOIO)
......@@ -11,6 +11,7 @@ FIND_LIBRARY(Popc_LIBRARY
NAMES libparoc_common.a
PATHS
"${POPC_ROOT}/lib"
"${POPC_ROOT}/popc/lib"
ENV LD_LIBRARY_PATH
"~/usr/lib"
"/usr/local/lib"
......@@ -30,6 +31,7 @@ FIND_PATH(Popc_INCLUDE_DIR
#HINTS ${POPC_ROOT}/include
PATHS
"${POPC_ROOT}/include"
"${POPC_ROOT}/popc/include"
"~/usr/include"
"/usr/local/include"
"/usr/include"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment