DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Pending]
Link: http://www.fltk.org/str.php?L2317
Version: 1.3-current
Fix Version: 1.3-current (r7452)
CMake/make includes the wrong config.h file in an out-of-source build, if
there is one in the FLTK source tree. This is likely to happen if you run
make (accidentally or intentionally) in the source directory. If you do
that, configure creates a config.h file, and the CMake build includes
_this_ file instead of the one in the build directory. This would
especially be wrong if cross-compiling.
My configuration:
source directory: /home/fltk/fltk-1.3-cmake
build directory: /home/fltk/fltk-1.3-cmake/build
C++ command line generated by CMake/make:
/usr/bin/c++ -D<...> \
-I/home/fltk/fltk-1.3-cmake \
-I/home/fltk/fltk-1.3-cmake/build \
-I<...> \
-o CMakeFiles/blocks.dir/blocks.cxx.o \
-c /home/fltk/fltk-1.3-cmake/test/blocks.cxx
Having -I<source directory> before -I<build directory> causes this to
happen. AFAICT changing the order of these two fixes the problem.
Michael, please have a look at the attached patch file
configh_binary_dir.diff whether this would be a proper solution or if we
need other changes. It works for me on Linux as expected. TIA.
Albrecht
Link: http://www.fltk.org/str.php?L2317
Version: 1.3-current
Fix Version: 1.3-current (r7452)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 7528)
+++ CMakeLists.txt (working copy)
@@ -46,7 +46,7 @@
# Search for modules in the FLTK source dir first
set(CMAKE_MODULE_PATH "${FLTK_SOURCE_DIR}/CMake")
-include_directories(${FLTK_SOURCE_DIR} ${FLTK_BINARY_DIR})
+include_directories(${FLTK_BINARY_DIR} ${FLTK_SOURCE_DIR})
# If this is out-of-source build, then copy FL directory
if(NOT ${FLTK_SOURCE_DIR} STREQUAL ${FLTK_BINARY_DIR})
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs