summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2016-11-01 20:45:42 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2016-11-01 20:45:42 +0000
commitaf2dc3bce82b777376e755d7b329a25b8764d556 (patch)
tree3be62d18f9ccdedacccf696275a7c7708f837d1e
parent2714c7600eba1c6ec6c35d2b87f69ef2c0db8c73 (diff)
Minor CMake documentation clarification.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12070 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--README.CMake.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/README.CMake.txt b/README.CMake.txt
index b8b28b81d..84a128757 100644
--- a/README.CMake.txt
+++ b/README.CMake.txt
@@ -372,8 +372,9 @@ add_custom_command(
COMMAND fluid -c ${CMAKE_CURRENT_SOURCE_DIR}/CubeViewUI.fl
)
-include_directories(${CMAKE_BINARY_DIR})
-include_directories(${CMAKE_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
add_executable(CubeView WIN32 CubeMain.cxx CubeView.cxx CubeViewUI.cxx)
target_link_libraries(CubeView fltk fltk_gl)
@@ -383,6 +384,17 @@ You can repeat the add_custom_command for each fluid file or if you have
a large number of them see the CMake/macros.cmake function FLTK_RUN_FLUID
for an example of how to run it in a loop.
+The two lines
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
+add the current build ("binary") and source directories as include directories.
+This is necessary for the compiler to find the local header files since the
+fluid-generated files (CubeViewUI.cxx and CubeViewUI.h) are created in the
+current build directory.
+
+
DOCUMENT HISTORY
==================