WSL/SLF GitLab Repository

Commit f8a93f32 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

The CMakeLists should be a little bit cleaner. But the Windows installer still...

The CMakeLists should be a little bit cleaner. But the Windows installer still does not work (it does not find the dll files).
parent 04e37786
......@@ -32,17 +32,17 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
set(OPTIM "-g -O3 -DNDEBUG")
set(ARCH_OPTIM "-march=pentium4 -mtune=native")
set(ARCH_SAFE "-march=pentium4")
set(DEBUG "-g -O0 -D__DEBUG")
set(DEBUG "-g3 -O0 -D__DEBUG")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(MSVC)
# for linker, "/MD /MDd"?
#set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "limited configs" FORCE)
set(WARNINGS "/W4")
set(EXTRA_WARNINGS "/Wp64") #/Wall
set(OPTIM "/O2 /Vmb")
set(OPTIM "/O2 /Vmb /DNDEBUG /MD")
set(ARCH_OPTIM "/arch:SSE2")
set(ARCH_SAFE "")
set(DEBUG "/Z7 /Od /D__DEBUG")
set(DEBUG "/Z7 /Od /D__DEBUG /MDd")
LIST(APPEND CFLAGS " /D_CRT_SECURE_NO_WARNINGS /D_USE_MATH_DEFINES") #Za: strict ansi
IF(DEBUG_ARITHM)
LIST(APPEND CFLAGS " /EHa ")
......@@ -52,12 +52,18 @@ ENDIF(MSVC)
IF(UNIX)
IF(APPLE)
set(PLATFORM "-DAPPLE")
set(DLL_EXT "dylib")
set(STAT_EXT "a")
ELSE(APPLE)
set(PLATFORM "-DLINUX")
set(DLL_EXT "so")
set(STAT_EXT "a")
ENDIF(APPLE)
ELSE(UNIX)
IF(WIN32)
#set(PLATFORM "-U__STRICT_ANSI__ -D_USE_MATH_DEFINES")
set(PLATFORM "-D_WIN32")
set(DLL_EXT "dll")
set(STAT_EXT "a")
ENDIF(WIN32)
ENDIF(UNIX)
......@@ -65,6 +71,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "release" CACHE STRING
"Choose the type of build, options are: debug release "
FORCE)
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
endif(NOT CMAKE_BUILD_TYPE)
###########################################################
......@@ -133,14 +140,18 @@ INSTALL(FILES ${hfiles} ${phfiles} DESTINATION include/meteoio COMPONENT headers
INSTALL(FILES ${hlawsfiles} DESTINATION include/meteoio/meteolaws COMPONENT headers)
INSTALL(FILES ${hfilterfiles} DESTINATION include/meteoio/meteofilters COMPONENT headers)
FILE(GLOB solibs "${PROJECT_SOURCE_DIR}/lib/libmeteoio*.so*")
FILE(GLOB plugins "${PROJECT_SOURCE_DIR}/lib/plugins/lib*.so*")
FILE(GLOB alibs "${PROJECT_SOURCE_DIR}/lib/*.a*")
IF(WIN32) #handle the special case of WIN32 needing import libraries
FILE(GLOB importlibs "${CMAKE_CURRENT_BINARY_DIR}/libmeteoio*.lib*")
ENDIF(WIN32)
FILE(GLOB solibs "${CMAKE_BINARY_DIR}/lib/libmeteoio*.${DLL_EXT}*")
FILE(GLOB plugins "${CMAKE_BINARY_DIR}/lib/plugins/lib*.${DLL_EXT}*")
FILE(GLOB alibs "${CMAKE_BINARY_DIR}/lib/*.${STAT_EXT}*")
IF(DEST MATCHES "par")
FILE(GLOB modules "${PROJECT_SOURCE_DIR}/lib/*.module")
FILE(GLOB modules "${CMAKE_BINARY_DIR}/lib/*.module")
INSTALL(FILES ${modules} DESTINATION lib/meteoio COMPONENT libraries)
ENDIF(DEST MATCHES "par")
INSTALL(FILES ${solibs} ${alibs} DESTINATION lib COMPONENT libraries)
INSTALL(FILES ${solibs} ${importlibs} ${alibs} DESTINATION lib COMPONENT libraries)
INSTALL(FILES ${plugins} DESTINATION lib/meteoio/plugins COMPONENT plugins)
......
......@@ -3,12 +3,13 @@ INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
set(LIBPREFIX "lib") #make sure ALL plugins are libXXX for ALL plateforms
set(CMAKE_IMPORT_LIBRARY_PREFIX "lib") #for Visual C++ import libraries
#SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
IF(PROJ4)
FIND_PATH(LIBPROJ_INCLUDE_DIR "proj_api.h")
FIND_LIBRARY(LIBPROJ proj)
INCLUDE_DIRECTORIES(${LIBPROJ_INCLUDE_DIR})
ADD_DEFINITIONS(-DPROJ4)
ADD_DEFINITIONS(-DPROJ4) #it looks like some VC++ versions don't support -D syntax
ENDIF(PROJ4)
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteolaws/CMakeLists.txt")
......@@ -91,8 +92,8 @@ ELSE(DEST)
TARGET_LINK_LIBRARIES(${STATICNAME} ${LIBPROJ})
SET_TARGET_PROPERTIES(${SHAREDNAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
CLEAN_DIRECT_OUTPUT 1
VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
SOVERSION "${VERSION_MAJOR}"
......@@ -108,8 +109,8 @@ endif(DEST MATCHES "par")
SET_TARGET_PROPERTIES(${STATICNAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
CLEAN_DIRECT_OUTPUT 1
OUTPUT_NAME ${STATICLIBNAME}
)
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = MeteoIODoc
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = MeteoIODoc-2.0.0
PROJECT_NUMBER = MeteoIODoc-2.0.1
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -41,7 +41,7 @@ ELSE(DEST)
SET(SHAREDNAME ${PROJECT_NAME})
ENDIF(DEST MATCHES "par")
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lib)
IF(PLUGIN_SMETIO)
ADD_LIBRARY(${SMETIONAME} SMETIO.cc)
......@@ -49,8 +49,8 @@ IF(PLUGIN_SMETIO)
TARGET_LINK_LIBRARIES(${SMETIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${SMETIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${SMETIONAME})
ENDIF(PLUGIN_SMETIO)
......@@ -60,8 +60,8 @@ IF(PLUGIN_ARCIO)
TARGET_LINK_LIBRARIES(${ARCIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${ARCIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${ARCIONAME})
ENDIF(PLUGIN_ARCIO)
......@@ -71,8 +71,8 @@ IF(PLUGIN_PGMIO)
TARGET_LINK_LIBRARIES(${PGMIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${PGMIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${PGMIONAME})
ENDIF(PLUGIN_PGMIO)
......@@ -82,8 +82,8 @@ IF(PLUGIN_ARPSIO)
TARGET_LINK_LIBRARIES(${ARPSIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${ARPSIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${ARPSIONAME})
ENDIF(PLUGIN_ARPSIO)
......@@ -93,8 +93,8 @@ IF(PLUGIN_GRASSIO)
TARGET_LINK_LIBRARIES(${GRASSIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${GRASSIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${GRASSIONAME})
ENDIF(PLUGIN_GRASSIO)
......@@ -104,8 +104,8 @@ IF(PLUGIN_GEOTOPIO)
TARGET_LINK_LIBRARIES(${GEOTOPIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${GEOTOPIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${GEOTOPIONAME})
ENDIF(PLUGIN_GEOTOPIO)
......@@ -115,8 +115,8 @@ IF(PLUGIN_SNIO)
TARGET_LINK_LIBRARIES(${SNIONAME} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${SNIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${SNIONAME})
ENDIF(PLUGIN_SNIO)
......@@ -132,8 +132,8 @@ IF(PLUGIN_GSNIO)
ADD_DEPENDENCIES(${GSNIONAME} wsdl2cpp gsnclient)
SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
#necessary because gsoap uses long long
SET_TARGET_PROPERTIES(${GSNIONAME} PROPERTIES COMPILE_FLAGS "-Wno-long-long")
......@@ -147,24 +147,21 @@ IF(PLUGIN_IMISIO)
TARGET_LINK_LIBRARIES(${IMISIONAME} ${OCCI_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${IMISIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${IMISIONAME})
ENDIF(PLUGIN_IMISIO)
IF(PLUGIN_BORMAIO)
#find_path(XMLPP_INC "libxml++-2.6/libxml++/libxml++.h")
#find_library(XMLPP xml++-2.6)
FIND_PACKAGE(LibXML++ REQUIRED)
INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
#include_directories("${XMLPP_INC}/libxml++-2.6")
ADD_LIBRARY(${BORMAIONAME} BormaIO.cc)
TARGET_LINK_LIBRARIES(${BORMAIONAME} ${LibXML++_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${BORMAIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${BORMAIONAME})
ENDIF(PLUGIN_BORMAIO)
......@@ -176,8 +173,8 @@ IF(PLUGIN_COSMOXMLIO)
TARGET_LINK_LIBRARIES(${COSMOXMLIONAME} ${LibXML++_LIBRARIES} ${SHAREDNAME})
SET_TARGET_PROPERTIES(${COSMOXMLIONAME} PROPERTIES
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/plugins
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
SOVERSION ${VERSION_MAJOR})
SET(MYPLUGINS ${MYPLUGINS} ${COSMOXMLIONAME})
ENDIF(PLUGIN_COSMOXMLIO)
......
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