첫 번째 cmake 프로젝트를 만들려고합니다. 나는 아주 간단한 설정을 가지고 있지만 find_package가 작동하지 않는 것처럼 보일 수 있습니다. 저는 Mac OS X 10.9.3이고 dmg 패키지 (cmake 버전 2.8.12.2)에서 cmake를 설치했습니다. 나는 다음과 같이 매우 간단한 CMakeLists.txt을 만들었습니다cmake find_package가 Mac OS X에서 작동하지 않습니다
cmake_minimum_required (VERSION 2.8)
project (Tutorial)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} “${CMAKE_SOURCE_DIR}/cmake/Modules”)
message(STATUS ${CMAKE_MODULE_PATH})
FIND_PACKAGE(GSL REQUIRED)
add_executable(Tutorial src/main.cpp)
을 내 터미널 출력에 의해 같이 cmake/모듈 폴더에 (다운로드)를 FindGSL.cmake 파일에 놓여있다 :
bash-3.2$ ls cmake/Modules/
FindGSL.cmake
다음 cmake에서 다음 출력을 얻을 :
bash-3.2$ cmake ../
-- “/Users/adam/repos/ctmc/cmake/Modules”
CMake Error at CMakeLists.txt:6 (FIND_PACKAGE):
By not providing "FindGSL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "GSL", but
CMake did not find one.
Could not find a package configuration file provided by "GSL" with any of
the following names:
GSLConfig.cmake
gsl-config.cmake
Add the installation prefix of "GSL" to CMAKE_PREFIX_PATH or set "GSL_DIR"
to a directory containing one of the above files. If "GSL" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/Users/adam/repos/ctmc/build/CMakeFiles/CMakeOutput.log".
누구든지 내가 뭘 잘못 지적 할 수 있을까요?
나를 위해 잘 작동합니다. '/ Users/adam/repos/ctmc/cmake/Modules/FindGSL.cmake' 파일이 있는지 확인 하시겠습니까? –
이상한, 네, 파인더에서 확인하고 커맨드 라인에서 파일이나 설정에 필요한 환경 변수에 대한 사용 권한인지 궁금 해서요! – madawilliams
나는 리눅스 박스에서도 똑같은 오류를 시도했다. FindGSL.cmake 파일에 오류가있는 경우이 메시지가 표시됩니까 – madawilliams