patch-CMakeLists_txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. $OpenBSD: patch-CMakeLists_txt,v 1.2 2014/11/04 14:58:39 dcoppa Exp $
  2. Don't use "-isystem /usr/..." but regular "-I/usr/..."
  3. Prevents "error: template with C linkage" errors.
  4. http://www.mail-archive.com/cmake@cmake.org/msg13226.html
  5. --- CMakeLists.txt.orig Thu Apr 22 19:48:48 2010
  6. +++ CMakeLists.txt Tue Nov 4 15:48:30 2014
  7. @@ -6,6 +6,8 @@ else(WIN32)
  8. cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
  9. endif(WIN32)
  10. +SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
  11. +
  12. # Path to local CMake modules.
  13. set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
  14. @@ -30,8 +32,8 @@ option(USE_WX_GRAPHICS_CONTEXT
  15. if(CMAKE_COMPILER_IS_GNUCXX)
  16. # Set default flags for Release build.
  17. - set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
  18. - set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
  19. + set(CMAKE_C_FLAGS_RELEASE "-Wall -DNDEBUG")
  20. + set(CMAKE_CXX_FLAGS_RELEASE "-Wall -DNDEBUG")
  21. set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
  22. # Set default flags for Debug build.
  23. @@ -163,7 +165,9 @@ endif(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
  24. # Include paths.
  25. -include_directories(${CMAKE_SOURCE_DIR}/include
  26. +include_directories(${X11BASE}/include/
  27. + ${LOCALBASE}/include/
  28. + ${CMAKE_SOURCE_DIR}/include
  29. ${CMAKE_SOURCE_DIR}/share
  30. ${CMAKE_BINARY_DIR})