Skip to content
Snippets Groups Projects
Commit 233215d6 authored by Riccardo Maria Bianchi's avatar Riccardo Maria Bianchi :sunny:
Browse files

moved GeoModelXML to its own subfolder

parent 0e23ee70
No related branches found
No related tags found
1 merge request!67Bringing GeoModelXML into GeoModel
Showing
with 64 additions and 64 deletions
# Set up the project.
cmake_minimum_required( VERSION 3.1 )
project( "GMX" VERSION 1.0.0 LANGUAGES CXX )
# By default prefer not to use frameworks on macOS.
# But use it at a "LAST" resource, if no other options worked.
# For details on the behaviour of this cache variable, see:
# - https://cmake.org/cmake/help/v3.0/command/find_file.html
set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
"Framework finding behaviour on macOS" )
add_subdirectory(GeoModelXml)
add_subdirectory(GMXPlugin)
install(EXPORT GeoModelXml-export FILE GMX-GeoModelXml.cmake DESTINATION lib/cmake/GMX)
install(FILES cmake/GMXConfig.cmake DESTINATION lib/cmake/GMX)
cmake_minimum_required( VERSION 3.1 )
# Set up the project.
project( "GeoModelXml" VERSION 1.0.0 LANGUAGES CXX )
find_package( GeoModelCore REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( GeoModelTools REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( XercesC REQUIRED )
find_package( ZLIB REQUIRED )
# Set default build options.
set( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build mode to use" )
set( CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used for the build" )
set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" )
# Use the GNU install directory names.
include( GNUInstallDirs )
cmake_minimum_required( VERSION 3.1 )
project( "GMX" VERSION 1.0.0 LANGUAGES CXX )
# Find the header and source files.
file( GLOB SOURCES src/*.cxx )
file( GLOB HEADERS GeoModelXml/*.h )
file( GLOB SHAPEHEADERS GeoModelXml/shape/*.h )
# By default prefer not to use frameworks on macOS.
# But use it at a "LAST" resource, if no other options worked.
# For details on the behaviour of this cache variable, see:
# - https://cmake.org/cmake/help/v3.0/command/find_file.html
set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
"Framework finding behaviour on macOS" )
# Create the library.
add_library( GeoModelXml SHARED ${HEADERS} ${SOURCES} )
set_property( TARGET GeoModelXml
PROPERTY PUBLIC_HEADER ${HEADERS} )
add_subdirectory(GeoModelXml)
add_subdirectory(GMXPlugin)
target_compile_definitions( GeoModelXml PUBLIC -DSTANDALONE_GMX )
target_link_libraries( GeoModelXml PUBLIC GeoModelCore::GeoModelKernel GeoModelTools::ExpressionEvaluator XercesC::XercesC ZLIB::ZLIB )
# target_include_directories( AGDDKernel SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR} ) )
target_include_directories( GeoModelXml PUBLIC ${EIGEN3_INCLUDE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> )
source_group( "GeoModelXml" FILES ${HEADERS} )
source_group( "src" FILES ${SOURCES} )
install(EXPORT GeoModelXml-export FILE GMX-GeoModelXml.cmake DESTINATION lib/cmake/GMX)
install(FILES cmake/GMXConfig.cmake DESTINATION lib/cmake/GMX)
#
install( TARGETS GeoModelXml EXPORT GeoModelXml-export LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GeoModelXml )
install( FILES ${SHAPEHEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GeoModelXml/shape)
#
# Version the shared library.
#
set_target_properties( GeoModelXml PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR} )
File moved
cmake_minimum_required( VERSION 3.1 )
# Set up the project.
project( "GeoModelXml" VERSION 1.0.0 LANGUAGES CXX )
find_package( GeoModelCore REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( GeoModelTools REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( XercesC REQUIRED )
find_package( ZLIB REQUIRED )
# Set default build options.
set( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build mode to use" )
set( CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used for the build" )
set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" )
# Use the GNU install directory names.
include( GNUInstallDirs )
# Find the header and source files.
file( GLOB SOURCES src/*.cxx )
file( GLOB HEADERS GeoModelXml/*.h )
file( GLOB SHAPEHEADERS GeoModelXml/shape/*.h )
# Create the library.
add_library( GeoModelXml SHARED ${HEADERS} ${SOURCES} )
set_property( TARGET GeoModelXml
PROPERTY PUBLIC_HEADER ${HEADERS} )
target_compile_definitions( GeoModelXml PUBLIC -DSTANDALONE_GMX )
target_link_libraries( GeoModelXml PUBLIC GeoModelCore::GeoModelKernel GeoModelTools::ExpressionEvaluator XercesC::XercesC ZLIB::ZLIB )
# target_include_directories( AGDDKernel SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR} ) )
target_include_directories( GeoModelXml PUBLIC ${EIGEN3_INCLUDE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include> )
source_group( "GeoModelXml" FILES ${HEADERS} )
source_group( "src" FILES ${SOURCES} )
#
install( TARGETS GeoModelXml EXPORT GeoModelXml-export LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GeoModelXml )
install( FILES ${SHAPEHEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GeoModelXml/shape)
#
# Version the shared library.
#
set_target_properties( GeoModelXml PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR} )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment