From a41a3f63d27864276ac441ea38ffa04d3d47f4a4 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 9 Jul 2014 11:00:20 -0700 Subject: [PATCH] Fixing platforms specific file issue --- Samples/CommonSrc/CMakeLists.txt | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Samples/CommonSrc/CMakeLists.txt b/Samples/CommonSrc/CMakeLists.txt index 627130b..1b1bbdd 100644 --- a/Samples/CommonSrc/CMakeLists.txt +++ b/Samples/CommonSrc/CMakeLists.txt @@ -1,5 +1,31 @@ project(CommonSrc) -file(GLOB_RECURSE SOURCE_FILES *.h *.cpp) +file(GLOB SOURCE_FILES + Util/*.h Util/*.cpp + Platform/Platform* + Platform/Gamepad* + Render/Render_Device* + Render/Render_Font* + Render/Render_Load* + Render/Render_Xml* + Render/Render_GL_Device* +) -add_library (CommonSrc STATIC ${SOURCE_FILES}) +if(WIN32) + file(GLOB PLATFORM_SOURCE_FILES + Platform/Win32* + Render/Render_GL_Win32* + Render/Render_D3D* + ) +elseif(APPLE) + file(GLOB PLATFORM_SOURCE_FILES + Platform/OSX* + ) +else() + file(GLOB PLATFORM_SOURCE_FILES + Platform/Linux* + ) +endif() + + +add_library (CommonSrc STATIC ${SOURCE_FILES} ${PLATFORM_SOURCE_FILES})