#cmake building error not able to compile simple test program

1 messages · Page 1 of 1 (latest)

cobalt haven
#
cmake_minimum_required (VERSION 3.8)
set(CMAKE_C_COMPILER "C:\\mingw64\\bin\\gcc.exe")
set(CMAKE_CXX_COMPILER "C:\\mingw64\\bin\\g++.exe")
project("acoolmp_game")

include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
set(BUILD_GAMES    OFF CACHE BOOL "" FORCE) # don't build the supplied example games
FetchContent_Declare(
    raylib
    GIT_REPOSITORY "https://github.com/raysan5/raylib.git"
    GIT_TAG "master"
    GIT_PROGRESS TRUE
    )
FetchContent_MakeAvailable(raylib)
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
add_executable (acoolmp_game "${SRC_FILES}" "main.c" "main.h")
target_include_directories(acoolmp_game PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/libs/")
target_link_libraries(acoolmp_game PRIVATE raylib)

set_property(TARGET Formuliazer PROPERTY CXX_STANDARD 20)
sweet boltBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

wet quiver
#

This is a bit of a hail mary, but could you try using forward slashes in the paths to the compiler?

set(CMAKE_C_COMPILER "C:/mingw64/bin/gcc.exe")
set(CMAKE_CXX_COMPILER "C:/mingw64/bin/g++.exe")