mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 04:53:40 +00:00
Fix build on VS2015
This commit is contained in:
parent
2859dbb6e4
commit
c2ad7496a8
3 changed files with 40 additions and 37 deletions
|
@ -79,47 +79,50 @@ FOREACH(TEST ${TESTS})
|
|||
ADD_TEST(${TEST_NAME} ${TEST_NAME})
|
||||
ENDFOREACH()
|
||||
|
||||
IF( PNG_FOUND )
|
||||
|
||||
# Setup the test that makes sure that we don't have any
|
||||
# regressions in the ASTC decoder.
|
||||
SET(TEST_NAME Test_ASTCEncoder_Decompress)
|
||||
# Setup the test that makes sure that we don't have any
|
||||
# regressions in the ASTC decoder.
|
||||
SET(TEST_NAME Test_ASTCEncoder_Decompress)
|
||||
|
||||
# Copy the .pvr files that we will use for testing...
|
||||
SET(TEST_IMAGES 4x4 12x12 8x8 6x5 10x8 )
|
||||
FOREACH(IMAGE ${TEST_IMAGES})
|
||||
FILE(COPY
|
||||
${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_${IMAGE}.astc
|
||||
DESTINATION ${CMAKE_BINARY_DIR}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
# Copy the .pvr files that we will use for testing...
|
||||
SET(TEST_IMAGES 4x4 12x12 8x8 6x5 10x8 )
|
||||
FOREACH(IMAGE ${TEST_IMAGES})
|
||||
FILE(
|
||||
COPY ${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_${IMAGE}.astc
|
||||
DESTINATION ${CMAKE_BINARY_DIR}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
)
|
||||
ENDFOREACH()
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(IMAGE ${TEST_IMAGES})
|
||||
FILE(COPY
|
||||
${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_decompressed_${IMAGE}.png
|
||||
DESTINATION ${CMAKE_BINARY_DIR}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
)
|
||||
ENDFOREACH()
|
||||
FOREACH(IMAGE ${TEST_IMAGES})
|
||||
FILE(
|
||||
COPY ${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_decompressed_${IMAGE}.png
|
||||
DESTINATION ${CMAKE_BINARY_DIR}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
)
|
||||
ENDFOREACH()
|
||||
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Core/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
|
||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Core/include )
|
||||
|
||||
# HACK for MSVC 2012...
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
|
||||
ENDIF()
|
||||
# HACK for MSVC 2012...
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
|
||||
ENDIF()
|
||||
|
||||
# The cpp file to compile for the test
|
||||
ADD_EXECUTABLE(${TEST_NAME} TestASTCDecompression.cpp)
|
||||
# The cpp file to compile for the test
|
||||
ADD_EXECUTABLE(${TEST_NAME} TestASTCDecompression.cpp)
|
||||
|
||||
# Libraries that we need...
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} ASTCEncoder)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCBase)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCCore)
|
||||
# Libraries that we need...
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} ASTCEncoder)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCBase)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO)
|
||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCCore)
|
||||
|
||||
ADD_TEST(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${TEST_NAME})
|
||||
ADD_TEST(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${TEST_NAME})
|
||||
|
||||
ENDIF( PNG_FOUND )
|
|
@ -173,7 +173,8 @@ INSTALL(
|
|||
ENABLE_TESTING()
|
||||
|
||||
IF(MSVC)
|
||||
SET(gtest_force_shared_crt TRUE)
|
||||
MESSAGE("Setting force shared crt")
|
||||
SET(gtest_force_shared_crt TRUE CACHE BOOL "Used to properly select MSVC runtime libraries" FORCE)
|
||||
ENDIF(MSVC)
|
||||
|
||||
ADD_SUBDIRECTORY(GTest)
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
|
||||
#if _MSC_VER
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#include "PVRTCImage.h"
|
||||
|
|
Loading…
Reference in a new issue