From afb3abb618b785a2eeaced20ae9d805a545bc1de Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 31 May 2013 10:55:27 +0000 Subject: [PATCH] Win32 compatibility --- src/CMakeLists.txt | 5 +++-- src/Core/Log.cxx | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc4bfd7..8fc783a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -38,7 +38,8 @@ IF (MSVC) add_definitions(/wd4251 /wd4290) # Disable annoying Visual C++ warnings ENDIF (MSVC) -include_directories(${PTHREAD_INCLUDE_DIR}) +# !!! to avoid using wrong config.h file on win32 platform add include directories only in following order +include_directories(${CMAKE_BINARY_DIR} ${PTHREAD_INCLUDE_DIR}) add_subdirectory (Core) @@ -62,7 +63,7 @@ ENDIF (NOT WIN32) add_library(batch SHARED ${SRC_FILES}) -include_directories(${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Core) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Core) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Local) target_link_libraries(batch ${PTHREAD_LIBRARY}) diff --git a/src/Core/Log.cxx b/src/Core/Log.cxx index 980b2c1..2011bd3 100644 --- a/src/Core/Log.cxx +++ b/src/Core/Log.cxx @@ -29,6 +29,10 @@ #include "Utils.hxx" #include "Log.hxx" +#ifdef WIN32 +#include +#endif + using namespace std; namespace Batch { -- 2.39.2