project(boot_startup LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt5 COMPONENTS Core Widgets REQUIRED)

find_package(Eigen3 REQUIRED)
enable_language(Fortran)

if(CMAKE_Fortran_COMPILER_ID)  
    message(STATUS "Fortran compiler found: ${CMAKE_Fortran_COMPILER}")  
else()  
    message(FATAL_ERROR "Fortran compiler not found")  
endif()  

include(../../cmake/TBPLASVars.cmake)

include_directories(${EIGEN3_INCLUDE_DIR})

add_subdirectory(tbpm_sample)
add_subdirectory(builder_sample)

add_executable(bootstartup
  main.cpp
)


target_link_directories(bootstartup PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES})
include_directories( ${Qt5Widgets_INCLUDE_DIRS})
include_directories( ${Qt5Core_INCLUDE_DIRS})

target_link_libraries(bootstartup fortran_dll)
target_link_libraries(bootstartup Qt5::Core Qt5::Widgets)
