message: mstarch: restructuring platfrom cmake to look parallel to any toolchain
diff: @@ -20,10 +20,15 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/${PLATFORM}")
  string(REGEX REPLACE ".cmake" "" PLATFORM_NO_SUFFIX "${PLATFORM}")
  -message(STATUS "Including ${CMAKE_CURRENT_LIST_DIR}/${PLATFORM_NO_SUFFIX}.cmake")
  -
  +get_filename_component(TOOLCHAIN_DIR "${CMAKE_TOOLCHAIN_FILE}" DIRECTORY)
  +if ("${TOOLCHAIN_DIR}" STREQUAL "")
  + set(TOOLCHAIN_DIR "${CMAKE_CURRENT_LIST_DIR}")
  +endif()
  +set(EXPECTED_PLATFORM_FILE "${TOOLCHAIN_DIR}/../platform/${PLATFORM_NO_SUFFIX}.cmake")
  # Include host machine settings
  -if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/${PLATFORM_NO_SUFFIX}.cmake")
  - message(FATAL_ERROR "\n[F-PRIME] No platform config for '${PLATFORM_NO_SUFFIX}'. Please create: '${CMAKE_CURRENT_LIST_DIR}/${PLATFORM_NO_SUFFIX}.cmake'\n")
  +if (EXISTS "${EXPECTED_PLATFORM_FILE}")
  + message(STATUS "Including ${EXPECTED_PLATFORM_FILE}")
  + include("${EXPECTED_PLATFORM_FILE}")
  +else()
  + message(FATAL_ERROR "\n[F-PRIME] No platform config for '${PLATFORM_NO_SUFFIX}'. Please create: '${EXPECTED_PLATFORM_FILE}'\n")
  endif()
  -include("${CMAKE_CURRENT_LIST_DIR}/${PLATFORM_NO_SUFFIX}.cmake")
  