Browse Source

cmake fixes

Johannes Ruehle 12 years ago
parent
commit
4d0f55cd63
3 changed files with 13 additions and 1 deletions
  1. 1 1
      CMakeLists.txt
  2. 6 0
      core/CMakeDefinesConfig.h.in
  3. 6 0
      core/CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -18,7 +18,7 @@ ENDIF(WIN32)
 # add the binary tree to the search path for include files
 #include_directories ("${PROJECT_BINARY_DIR}")
 
-#SET(CMAKE_USE_RELATIVE_PATHS ON)
+SET(CMAKE_USE_RELATIVE_PATHS ON)
 check_symbol_exists("__assert_fail" "assert.h" HAVE_ASSERT_FAIL)
 
 

+ 6 - 0
core/CMakeDefinesConfig.h.in

@@ -0,0 +1,6 @@
+#ifndef CMAKEDEFINESCONFIG_H
+#define CMAKEDEFINESCONFIG_H
+
+#cmakedefine USE_TEST
+
+#endif

+ 6 - 0
core/CMakeLists.txt

@@ -1,4 +1,10 @@
 
+CONFIGURE_FILE(
+  "CMakeDefinesConfig.h.in"
+  "${PROJECT_BINARY_DIR}/CMakeDefinesConfig.h"
+)
+include_directories("${PROJECT_BINARY_DIR}")
+
 INCLUDE_DIRECTORIES(basics)
 INCLUDE_DIRECTORIES(algebra)
 INCLUDE_DIRECTORIES(vector)