From: ana Date: Fri, 31 May 2013 10:55:27 +0000 (+0000) Subject: Win32 compatibility X-Git-Tag: V2_0_0_WIN~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=afb3abb618b785a2eeaced20ae9d805a545bc1de;p=tools%2Flibbatch.git Win32 compatibility --- 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 {