我在构建一个外部项目时遇到错误:
mingw32-make.exe[3]: *** No targets specified and no makefile found. Stop.
以下是用于在我的项目中构建它的relevant code:
FIND_PACKAGE(sphinxbase)
if (${SPHINXBASE_FOUND})
INCLUDE_DIRECTORIES(${SPHINXBASE_INCLUDE_DIR}/sphinxbase/)
else ()
ExternalProject_Add(
sphinxbase
GIT_REPOSITORY "https://github.com/syb0rg/sphinxbase.git"
#GIT_SHALLOW TRUE
SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/sphinxbase
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE ON
LOG_DOWNLOAD ON
LOG_UPDATE ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_TEST ON
LOG_INSTALL ON
)
ExternalProject_Get_Property(sphinxbase SOURCE_DIR)
ExternalProject_Get_Property(sphinxbase BINARY_DIR)
SET(SPHINXBASE_SOURCE_DIR ${SOURCE_DIR})
SET(SPHINXBASE_BINARY_DIR ${BINARY_DIR})
SET(SPHINXBASE_LIBRARIES ${SPHINXBASE_SOURCE_DIR}/bin/Debug/x64/sphinxbase.lib)
SET(DEPENDENCIES ${DEPENDENCIES} sphinxbase)
INCLUDE_DIRECTORIES(${SPHINXBASE_SOURCE_DIR}/include/win32)
INCLUDE_DIRECTORIES(${SPHINXBASE_SOURCE_DIR}/include)
endif ()
SET(LIBS ${LIBS} ${SPHINXBASE_LIBRARIES})
${CMAKE_BINARY_DIR}
已正确设置为C:/Users/syb0rg/Dropbox/Development/Khronos/Khronos/build
,以下是文件夹的部分外观:如您所见,我在指定的位置有一个makefile。怎么回事?为什么cmake/mingw找不到?
补充构建信息,link to full project
我的程序的配置日志:
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin/g++.exe
-- Check for working CXX compiler: C:/Program Files/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default to Release
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find sphinxbase (missing: SPHINXBASE_LIBRARY SPHINXBASE_INCLUDE_DIR)
-- Could NOT find pocketsphinx (missing: POCKETSPHINX_LIBRARY POCKETSPHINX_INCLUDE_DIR)
-- Could NOT find LibSndFile (missing: LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
-- Could NOT find tritium (missing: TRITIUM_LIBRARY TRITIUM_INCLUDE_DIR)
-- Any missing dependencies will be downloaded upon running "make"
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/syb0rg/Dropbox/Development/Khronos/Khronos/build
以及生成日志:
[ 2%] Performing build step for 'PortAudio'
-- PortAudio build command succeeded. See also C:/Users/syb0rg/Dropbox/Development/Khronos/Khronos/build/build-data/src/PortAudio-stamp/PortAudio-build-*.log
[ 4%] No install step for 'PortAudio'
[ 6%] Completed 'PortAudio'
[ 17%] Built target PortAudio
Scanning dependencies of target sphinxbase
[ 20%] Creating directories for 'sphinxbase'
[ 22%] Performing download step (git clone) for 'sphinxbase'
-- sphinxbase download command succeeded. See also C:/Users/syb0rg/Dropbox/Development/Khronos/Khronos/build/build-data/src/sphinxbase-stamp/sphinxbase-download-*.log
[ 24%] No patch step for 'sphinxbase'
[ 26%] No update step for 'sphinxbase'
[ 28%] No configure step for 'sphinxbase'
[ 31%] Performing build step for 'sphinxbase'
CMakeFiles\sphinxbase.dir\build.make:110: recipe for target 'build-data/src/sphinxbase-stamp/sphinxbase-build' failed
CMakeFiles\Makefile2:103: recipe for target 'CMakeFiles/sphinxbase.dir/all' failed
Makefile:82: recipe for target 'all' failed
最佳答案
停止使用明威。
MingW尚未更新since 2013。它已经被cygwin和
Mys2mingw项目甚至没有提供64-bit compiler。
cygwin可以在3 minutes中安装,我会试试。