# SLX - The Simple Library Extensions Library
#
# Copyright (c) 2021 William Berry
# email: wsberry@gmail.com
# github: https://github.com/wsberry
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may freely use this source code and its projects in compliance with the License.
#
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License src distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# A number of third party projects require this setting to enforce new CMake
# build behaviors when possible.
#
CMAKE_POLICY(SET CMP0054 NEW)

MESSAGE(STATUS "Importing settings for ${CMAKE_HOST_SYSTEM_NAME} OS...")

include(utils)

choose_package_manager()

# see: https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html

if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
    #
    # using Xcode
    #
    include(xcode-build-options)
    standard_xcode_options()

elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
    #
    # Using CLion
    #
    MESSAGE(FATAL_ERROR "Linux host system is not implemented!")

elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
    #
    # using Visual Studio C++
    #
    include(vs-build-options)
    standard_visual_studio_options()

else()
    MESSAGE(FATAL_ERROR "Host system, ${CMAKE_HOST_SYSTEM_NAME}, is not implemented or not supported!")
endif()


