mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-07 01:55:37 +00:00
Fix build on VS2015
This commit is contained in:
parent
2859dbb6e4
commit
c2ad7496a8
|
@ -79,47 +79,50 @@ FOREACH(TEST ${TESTS})
|
||||||
ADD_TEST(${TEST_NAME} ${TEST_NAME})
|
ADD_TEST(${TEST_NAME} ${TEST_NAME})
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
|
IF( PNG_FOUND )
|
||||||
|
|
||||||
# Setup the test that makes sure that we don't have any
|
# Setup the test that makes sure that we don't have any
|
||||||
# regressions in the ASTC decoder.
|
# regressions in the ASTC decoder.
|
||||||
SET(TEST_NAME Test_ASTCEncoder_Decompress)
|
SET(TEST_NAME Test_ASTCEncoder_Decompress)
|
||||||
|
|
||||||
# Copy the .pvr files that we will use for testing...
|
# Copy the .pvr files that we will use for testing...
|
||||||
SET(TEST_IMAGES 4x4 12x12 8x8 6x5 10x8 )
|
SET(TEST_IMAGES 4x4 12x12 8x8 6x5 10x8 )
|
||||||
FOREACH(IMAGE ${TEST_IMAGES})
|
FOREACH(IMAGE ${TEST_IMAGES})
|
||||||
FILE(COPY
|
FILE(
|
||||||
${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_${IMAGE}.astc
|
COPY ${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_${IMAGE}.astc
|
||||||
DESTINATION ${CMAKE_BINARY_DIR}
|
DESTINATION ${CMAKE_BINARY_DIR}
|
||||||
USE_SOURCE_PERMISSIONS
|
USE_SOURCE_PERMISSIONS
|
||||||
)
|
)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
FOREACH(IMAGE ${TEST_IMAGES})
|
FOREACH(IMAGE ${TEST_IMAGES})
|
||||||
FILE(COPY
|
FILE(
|
||||||
${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_decompressed_${IMAGE}.png
|
COPY ${FasTC_SOURCE_DIR}/ASTCEncoder/test/data/mandrill_decompressed_${IMAGE}.png
|
||||||
DESTINATION ${CMAKE_BINARY_DIR}
|
DESTINATION ${CMAKE_BINARY_DIR}
|
||||||
USE_SOURCE_PERMISSIONS
|
USE_SOURCE_PERMISSIONS
|
||||||
)
|
)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
|
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
|
||||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
|
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
|
||||||
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
|
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
|
||||||
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Core/include )
|
INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Core/include )
|
||||||
|
|
||||||
# HACK for MSVC 2012...
|
# HACK for MSVC 2012...
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
|
ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# The cpp file to compile for the test
|
# The cpp file to compile for the test
|
||||||
ADD_EXECUTABLE(${TEST_NAME} TestASTCDecompression.cpp)
|
ADD_EXECUTABLE(${TEST_NAME} TestASTCDecompression.cpp)
|
||||||
|
|
||||||
# Libraries that we need...
|
# Libraries that we need...
|
||||||
TARGET_LINK_LIBRARIES(${TEST_NAME} ASTCEncoder)
|
TARGET_LINK_LIBRARIES(${TEST_NAME} ASTCEncoder)
|
||||||
TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main)
|
TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main)
|
||||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCBase)
|
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCBase)
|
||||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO)
|
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCIO)
|
||||||
TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCCore)
|
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()
|
ENABLE_TESTING()
|
||||||
|
|
||||||
IF(MSVC)
|
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)
|
ENDIF(MSVC)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(GTest)
|
ADD_SUBDIRECTORY(GTest)
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
|
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
# define _CRT_SECURE_NO_WARNINGS
|
# define _CRT_SECURE_NO_WARNINGS
|
||||||
# define snprintf _snprintf
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "PVRTCImage.h"
|
#include "PVRTCImage.h"
|
||||||
|
|
Loading…
Reference in a new issue