set(LIBTCC_CONFIG_PATH "${CMAKE_CURRENT_BINARY_DIR}")

set(LIBTCC_BUILD_TYPE_DEFAULT STATIC)
set(LIBTCC_TARGET_SPECIFIC_NAME_DEFAULT FALSE)
set(LIBTCC_NAME_DEFAULT libtcc)
set(LIBTCC_INSTALL_RUNTIME_DEFAULT TRUE)
set(LIBTCC_RUNTIME_PATH_DEFAULT libtcc)
set(LIBTCC_ENABLE_EXTENSION_DEFAULT TRUE)
set(LIBTCC_ONE_SOURCE_DEFAULT FALSE)

if (NOT DEFINED LIBTCC_BUILD_TYPE)
    set(LIBTCC_BUILD_TYPE ${LIBTCC_BUILD_TYPE_DEFAULT})
endif ()
if (NOT DEFINED LIBTCC_TARGET_SPECIFIC_NAME)
    set(LIBTCC_TARGET_SPECIFIC_NAME ${LIBTCC_TARGET_SPECIFIC_NAME_DEFAULT})
endif ()
if (NOT DEFINED LIBTCC_INSTALL_RUNTIME)
    set(LIBTCC_INSTALL_RUNTIME ${LIBTCC_INSTALL_RUNTIME_DEFAULT})
endif ()
if (NOT DEFINED LIBTCC_ENABLE_EXTENSION)
    set(LIBTCC_ENABLE_EXTENSION ${LIBTCC_ENABLE_EXTENSION_DEFAULT})
endif ()
if (NOT DEFINED LIBTCC_ONE_SOURCE)
    set(LIBTCC_ONE_SOURCE ${LIBTCC_ONE_SOURCE_DEFAULT})
endif ()

if (NOT DEFINED LIBTCC_RUNTIME_PATH)
    set(LIBTCC_RUNTIME_PATH ${LIBTCC_RUNTIME_PATH_DEFAULT})
endif ()
if (ANDROID)
    set(LIBTCC_RUNTIME_TARGET_PATH ${CMAKE_SOURCE_DIR}/../assets/${LIBTCC_RUNTIME_PATH})
else ()
    set(LIBTCC_RUNTIME_TARGET_PATH ${CMAKE_BINARY_DIR}/${LIBTCC_RUNTIME_PATH})
endif ()

if (LIBTCC_ENABLE_EXTENSION)
    include(extension/cmake/libtcc_extension_default_parameter.cmake)
endif ()