#
# This is CMakeLists for project: CommonUtils
#
project(CommonUtils)

# ${SRC} cmake file defines ${SOURCES} variable which holds all sources used during compilation
include_cmake(${SRC})

enable_all_warnings()
enable_warnings_as_errors()

# Adds a library target called <name> to be built from the source files listed in the command invocation.
# The <name> corresponds to the logical target name and must be globally unique within a project.
# The actual file name of the library built is constructed based on conventions of the native platform (such as lib<name>.a or <name>.lib).
add_library(CommonUtils STATIC ${SOURCES} )

target_include_directories(CommonUtils
    SYSTEM PRIVATE
        "${Boost_INCLUDE_DIRS}"
)

target_include_directories(CommonUtils
    PRIVATE
        "${OPENIPC_ROOT}/Source/Public_Include"
        "${IPC_ROOT}/Private"
    )

target_include_directories(CommonUtils PUBLIC "Public")


set_target_properties(CommonUtils PROPERTIES
                      OUTPUT_NAME CommonUtils_${ARCHITECTURE_NAME}
                      FOLDER "/Foundation")

target_link_libraries(CommonUtils PRIVATE ${Boost_THREAD_LIBRARY}
                                          ${Boost_FILESYSTEM_LIBRARY}
                                          ${Boost_SYSTEM_LIBRARY}
                                          InternalUtils
                                          ${CMAKE_DL_LIBS})
