Skip to content
Snippets Groups Projects

Modernisation of CMake scripting to simplify build of FullSimLight

Merged Benjamin Morgan requested to merge bmorgan/GeoModel:modernize-cmake-fsl into master
All threads resolved!
55 files
+ 367
828
Compare changes
  • Side-by-side
  • Inline
Files
55
+ 3
18
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16...3.26)
project(fsl VERSION 0.1 LANGUAGES CXX)
@@ -20,11 +20,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
"Framework finding behaviour on macOS" )
# Set up how the project handle some of its dependenices. Either by picking them
# up from the environment, or building them itself.
if( NOT TARGET JSONExt )
include( SetupJSON )
endif()
# Set a flag to steer the of the subpackages
set( ${PROJECT_NAME}_INDIVIDUAL_BUILD ON )
include( SetupJSON )
find_package (FullSimLight REQUIRED)
add_definitions (-DFSLPLUGINROOT="${FullSimLight_DIR}/../../../${CMAKE_INSTALL_DATAROOTDIR}" )
message ( STATUS "FSL plugin files sought here: ${FullSimLight_DIR}/../../../${CMAKE_INSTALL_DATAROOTDIR}" )
@@ -80,18 +76,7 @@ set(PROJECT_SOURCES ${sources} ${headers} ${uis} )
add_executable(fsl ${PROJECT_SOURCES} )
target_link_libraries(fsl PRIVATE Qt5::Widgets)
if( GEOMODEL_USE_BUILTIN_JSON )
add_dependencies(fsl JSONExt )
endif()
if( nlohmann_json_FOUND )
target_link_libraries( fsl PRIVATE nlohmann_json::nlohmann_json )
endif()
target_link_libraries(fsl PRIVATE Qt5::Widgets nlohmann_json::nlohmann_json)
# Install the executable.
install( TARGETS fsl
Loading