C:\msys64\mingw64\bin\cmake.exe -DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
-DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\gcc.exe
-DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\g++.exe
--no-warn-unused-cli -SC:/Users/Ken/Desktop/prog24/Drawbox
-Bc:/Users/Ken/Desktop/prog24/Drawbox/build -G "Unix Makefiles"
>>
Not searching for unused variables given on the command line.
CMake Error at **C:/msys64/mingw64/share/cmake/Modules/CMakeDetermineCompilerId.cmake:444 (file):**
** file failed to open for reading (No such file or directory):**
** C:/Users/Ken/Desktop/prog24/Drawbox/src_in-NOTFOUND**
Call Stack (most recent call first):
C:/msys64/mingw64/share/cmake/Modules/CMakeDetermineCompilerId.cmake:481 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
C:/msys64/mingw64/share/cmake/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/msys64/mingw64/share/cmake/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)
C:/msys64/mingw64/share/cmake/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)
CMakeLists.txt:6 (project)
This text, starting with CMake Error, is repeated numerous times. CMakeLists.txt is here. I have seen this error in more than one directory, and even on a Macintosh computer! But can’t imagine what could be causing it. Why on earth would something that is searching for the compiler look in my project directory C:/Users/Ken/Desktop/prog24/Drawbox at all? Incidentally, a change of generator from “UNIX Makefiles” to “Ninja” makes no difference. And a removal of the build directory for clean rebuild makes no difference. If
cmake_minimum_required(VERSION 3.28)
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "" FORCE)
set(CMAKE_LIBRARY_ARCHITECTURE x86_64)
set(CMAKE_FIND_FRAMEWORK ONLY)
project(my-project)
set (TEST MiniClick.cpp)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(SDL2 REQUIRED COMPONENTS SDL2) # recommended in Readme
link_directories(${SDL2_LIBRARY_DIRS} ) # /usr/local/lib/
include_directories(/opt/homebrew/include . Library Tools Toolkit
hom APClass Library/jpeg)
message( STATUS SDL2_INCLUDE_DIRS=${SDL2_INCLUDE_DIRS} )
message( STATUS SDL2_LIBRARIES=${SDL2_LIBRARIES} )
message( STATUS SDL2_ttf_LIBRARIES=${SDL2_ttf_LIBRARIES} )
message( STATUS DRAWBOX=${DRAWBOX})
add_executable(TestProgram ${TEST} ${DRAWBOX} ${TOOLS} ${APCLASS})
target_compile_features(TestProgram PUBLIC cxx_std_11)
target_link_libraries(TestProgram ${SDL2_LIBRARIES} SDL2_gfx
SDL2::SDL2
)