[問題] 請問Cmake的問題??

看板LinuxDev作者 (~咖啡癮君子~)時間16年前 (2009/06/30 16:13), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
各位好,小弟我目前想要使用libsyncml這一個免費的library,但他是使用Cmake 去build,小弟按照他的步驟去安裝: mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=$prefix /path/to/libsyncml/source/ make make test (runs the testsuite if libcheck is installed) make install 但在cmake時後卻出現下列訊息 CMake Error: libsyncml doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake /home/albert/Android/libsyncml-0.5.2 [options]'! -- Configuring done 這行的定義是在CmakeList下: # ensure out od source build INCLUDE( MacroEnsureOutOfSourceBuild ) MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!") 他的意思是要我另外弄一個directory但試了許多方試還是行不通 看樣子他似乎對directory有定義一些規則但是不知道寫在哪裡 請問有沒有人知道這問題出哪 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.64.21

07/03 22:52, , 1F
cmake 那行最後加個 ".." 試試?
07/03 22:52, 1F

07/07 20:27, , 2F
mkdir tmp && cd tmp && cmake .. [options]
07/07 20:27, 2F
文章代碼(AID): #1AISa_-s (LinuxDev)
文章代碼(AID): #1AISa_-s (LinuxDev)