# [[[source: .
set(ide_source_group "Source Files")
set(source-group
    "${CMAKE_CURRENT_SOURCE_DIR}/main.cc")
source_group("${ide_source_group}" FILES ${source-group})
set(source
    ${source-group})
# ]]]

add_executable(clingo ${header} ${source})
target_link_libraries(clingo PRIVATE libclingo libpyclingo libluaclingo)
set_target_properties(clingo PROPERTIES FOLDER exe)
# Currently, there are some functions that are marked as dllexport. Because of
# them, the Windows linker outputs an import library that conflicts with the
# clingo library. The ideal solution would be to not export these functions.
# Unfortunately, this would mean editing autogenerated code.
set_target_properties(clingo PROPERTIES ARCHIVE_OUTPUT_NAME clingo_exe)

install(TARGETS clingo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

if (CLINGO_BUILD_TESTS)
    add_subdirectory(tests)
endif()
