diff options
Diffstat (limited to 'src/graphics/opengl/test/CMakeLists.txt')
-rw-r--r-- | src/graphics/opengl/test/CMakeLists.txt | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/src/graphics/opengl/test/CMakeLists.txt b/src/graphics/opengl/test/CMakeLists.txt index ce2a83f..36bd738 100644 --- a/src/graphics/opengl/test/CMakeLists.txt +++ b/src/graphics/opengl/test/CMakeLists.txt @@ -8,16 +8,46 @@ find_package(PNG REQUIRED) set(CMAKE_BUILD_TYPE debug) set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O0") - -set(SOURCES +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(PLATFORM_WINDOWS 1) + set(PLATFORM_LINUX 0) + set(PLATFORM_OTHER 0) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(PLATFORM_WINDOWS 0) + set(PLATFORM_LINUX 1) + set(PLATFORM_OTHER 0) +else() + set(PLATFORM_WINDOWS 0) + set(PLATFORM_LINUX 0) + set(PLATFORM_OTHER 1) +endif() + +configure_file(../../../common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common/config.h) + + +set(TEXTURE_SOURCES ../gldevice.cpp ../../common/device.cpp +../../common/texture.cpp ../../../common/logger.cpp ../../../common/image.cpp texture_test.cpp ) -include_directories(../../../) +set(MODEL_SOURCES +../gldevice.cpp +../../common/device.cpp +../../common/modelfile.cpp +../../common/texture.cpp +../../../common/logger.cpp +../../../common/image.cpp +../../../common/iman.cpp +../../../common/stringutils.cpp +../../../app/system.cpp +model_test.cpp +) + +include_directories(../../../ ${CMAKE_CURRENT_BINARY_DIR}) set(LIBS ${SDL_LIBRARY} @@ -26,6 +56,8 @@ ${OPENGL_LIBRARY} ${PNG_LIBRARIES} ) -add_executable(texture_test ${SOURCES}) - +add_executable(texture_test ${TEXTURE_SOURCES}) target_link_libraries(texture_test ${LIBS}) + +add_executable(model_test ${MODEL_SOURCES}) +target_link_libraries(model_test ${LIBS}) |