Browse Source

Moved SDL header include dir to 'Engine' scope as it is being referenced by a few Engine sub-directories and not just Graphics.

Yao Wei Tjong 姚伟忠 12 years ago
parent
commit
e3b53f97a1
2 changed files with 2 additions and 3 deletions
  1. 2 2
      Source/Engine/CMakeLists.txt
  2. 0 1
      Source/Engine/Graphics/CMakeLists.txt

+ 2 - 2
Source/Engine/CMakeLists.txt

@@ -118,8 +118,8 @@ set_source_files_properties (${ALL_OBJ_FILES} PROPERTIES GENERATED TRUE)
 foreach (LIST_NAME LIBS INCLUDE_DIRS_ONLY LINK_LIBS_ONLY)
     set_list (${LIST_NAME} ENGINE_${LIST_NAME} REMOVE_DUPLICATE)
 endforeach ()
-# Add include directory to find the export header
-list (APPEND INCLUDE_DIRS_ONLY ${CMAKE_BINARY_DIR}/Engine)
+# Add include directories to find the export header and SDL header
+list (APPEND INCLUDE_DIRS_ONLY ${CMAKE_BINARY_DIR}/Engine ../ThirdParty/SDL/include)
 
 # Setup library output path
 set (OUTPUT_PATH ${PROJECT_ROOT_DIR}/Lib)

+ 0 - 1
Source/Engine/Graphics/CMakeLists.txt

@@ -29,7 +29,6 @@ endif ()
 define_source_files (GLOB_CPP_PATTERNS *.cpp ${GRAPHICS_SYS_DIR}/*.cpp GLOB_H_PATTERNS *.h ${GRAPHICS_SYS_DIR}/*.h PARENT_SCOPE)
 
 # Define dependency libs
-set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/SDL/include PARENT_SCOPE)
 if (USE_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RASPI)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/GLEW PARENT_SCOPE)
 endif ()