# shflow

option(WITH_SH4LT_FLOW "shflow Command Line" ON)
    add_feature_info("shflow" WITH_SH4LT_FLOW "shflow Command Line")
if (WITH_SH4LT_FLOW)

    add_executable(shflow
            shflow.cpp
            )

    target_link_libraries(shflow PUBLIC ${SH4LT_LIBRARY}_static)
      
    # INSTALL
    if (SKBUILD)
      install(TARGETS shflow
        RUNTIME
        DESTINATION ${SKBUILD_SCRIPTS_DIR} 
      ) 
    else()
      install(TARGETS shflow
        RUNTIME
        DESTINATION bin
        COMPONENT lib
        )

      install(TARGETS shflow
        RUNTIME
        DESTINATION bin
        COMPONENT dev
        )

      install(TARGETS shflow
        RUNTIME
        DESTINATION bin
        COMPONENT dbg
        )
    endif ()
endif ()

# shcrash

option(WITH_SH4LT_CRASH "shcrash Command Line" ON)
add_feature_info("shcrash" WITH_SH4LT_CRASH "shcrash Command Line")
if (WITH_SH4LT_CRASH)

    add_executable(shcrash
        shcrash.cpp
        )

    target_link_libraries(shcrash PUBLIC ${SH4LT_LIBRARY}_static)

    # INSTALL
    if (NOT SKBUILD)
      install(TARGETS shcrash
        RUNTIME
        DESTINATION bin
        COMPONENT dev
        )

      install(TARGETS shcrash
        RUNTIME
        DESTINATION bin
        COMPONENT dbg
        )
    endif()
endif ()

# shlinew

option(WITH_SH4LT_WRITER "shlinew Command Line" ON)
add_feature_info("shlinew" WITH_SH4LT_WRITER "shlinew Command Line")
if (WITH_SH4LT_WRITER)

    add_executable(shlinew
        shlinew.cpp
        )

    target_link_libraries(shlinew PUBLIC ${SH4LT_LIBRARY}_static)

    # INSTALL

    if (SKBUILD)
      install(TARGETS shlinew
        RUNTIME
        DESTINATION ${SKBUILD_SCRIPTS_DIR} 
      ) 
    else()
      install(TARGETS shlinew
        RUNTIME
        DESTINATION bin
        COMPONENT lib
        )

      install(TARGETS shlinew
        RUNTIME
        DESTINATION bin
        COMPONENT dev
        )

      install(TARGETS shlinew
        RUNTIME
        DESTINATION bin
        COMPONENT dbg
        )
    endif()

endif ()
