私はCMakeでQtの実行可能ファイルを見つける方法について素晴らしい答えを見つけました、cmakeはQt4を見つけません
CMAKE_INCLUDE_PATHをどのように使用しますか?試してみましたが、エラーが発生しました。
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake_modules)
project(vrvu)
find_package(OpenGL REQUIRED)(CMAKE_INCLUDE_PATH <--- this is where I'm getting an error
C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin)find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
include(${QT_USE_FILE})
find_package(Coin3 REQUIRED)
find_package(Quarter REQUIRED)
add_subdirectory(bullet-2.77)
add_subdirectory(starlight)
file(GLOB SOURCES "*.cpp" "*.cxx" "*.h" "*.hpp")
include_directories(${OPENGL_INCLUDE_DIR} ${QT_INCLUDE_DIR} ${COIN_INCLUDE_DIR} ${QUARTER_INCLUDE_DIR} "./bullet-2.77/src" "./starlight")
link_directories(${QT_LIB_DIR} ${COIN_LINK_DIRECTORIES} ${QUARTER_LINK_DIRECTORIES})
add_definitions(${QT_DEFINITIONS} ${COIN_DEFINITIONS} ${QUARTER_DEFINITIONS})
add_executable(vrvu ${SOURCES})
target_link_libraries(vrvu ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${COIN_LIBRARIES} ${QUARTER_LIBRARIES} LinearMath BulletCollision starlight)
長いコードでごめんなさい....ありがとう!