diff --git a/src/cocoa/CMakeLists.txt b/src/cocoa/CMakeLists.txt index 5c867591..37c3b0a8 100644 --- a/src/cocoa/CMakeLists.txt +++ b/src/cocoa/CMakeLists.txt @@ -4,7 +4,8 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/libglfw.pc @ONLY) include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/src + ${GLFW_SOURCE_DIR}/src + ${GLFW_BINARY_DIR}/src ${GLFW_INCLUDE_DIR}) set(cocoa_SOURCES diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt index b4298567..9885ef3c 100644 --- a/src/win32/CMakeLists.txt +++ b/src/win32/CMakeLists.txt @@ -14,8 +14,9 @@ if(CYGWIN) endif(CYGWIN) -include_directories(${CMAKE_CURRENT_SOURCE_DIR} +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${GLFW_SOURCE_DIR}/src + ${GLFW_BINARY_DIR}/src ${GLFW_INCLUDE_DIR}) set(libglfw_SOURCES diff --git a/src/x11/CMakeLists.txt b/src/x11/CMakeLists.txt index 654f8463..2e20dadc 100644 --- a/src/x11/CMakeLists.txt +++ b/src/x11/CMakeLists.txt @@ -3,11 +3,10 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/libglfw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libglfw.pc @ONLY) -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${GLFW_INCLUDE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${GLFW_SOURCE_DIR}/src + ${GLFW_BINARY_DIR}/src + ${GLFW_INCLUDE_DIR}) set(libglfw_SOURCES ${common_SOURCES}