diff --git a/CLTool/CMakeLists.txt b/CLTool/CMakeLists.txt index 22278ff..223d39b 100644 --- a/CLTool/CMakeLists.txt +++ b/CLTool/CMakeLists.txt @@ -13,6 +13,12 @@ ADD_EXECUTABLE( ${SOURCES} ) +# Make sure that if we're using boost libraries for threading then we add this linker path. +# Personally, I believe this is a bug in CMAKE but I'm not exactly sure. +IF( THREAD_API MATCHES "Boost" ) + SET_TARGET_PROPERTIES(tc PROPERTIES LINK_FLAGS "/LIBPATH:\"${Boost_LIBRARY_DIRS}\"") +ENDIF() + TARGET_LINK_LIBRARIES( tc BPTCEncoder ) TARGET_LINK_LIBRARIES( tc TexCompIO ) TARGET_LINK_LIBRARIES( tc TexCompCore ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ae33ad..a3c64aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,28 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(TexC) +IF(MSVC) + SET(MSVC_INSTALL_PATH "${PROJECT_SOURCE_DIR}/Windows") + SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${MSVC_INSTALL_PATH}") + + IF(MSVC10) + SET(MSVC_VERSION_STRING vc100) + ELSEIF(MSVC11) + SET(MSVC_VERSION_STRING vc110) + ELSEIF(MSVC90) + SET(MSVC_VERSION_STRING vc90) + ELSEIF(MSVC80) + SET(MSVC_VERSION_STRING vc80) + ENDIF() + + # !FIXME! Actually detect compiler architecture version.... + SET(MSVC_ARCHITECTURE_STRING x64) + + SET(MSVC_LIB_DIR "${MSVC_INSTALL_PATH}/lib/${MSVC_ARCHITECTURE_STRING}/${MSVC_VERSION_STRING}") + SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${MSVC_LIB_DIR}") + +ENDIF(MSVC) + ADD_SUBDIRECTORY(BPTCEncoder) ADD_SUBDIRECTORY(IO) ADD_SUBDIRECTORY(Core)