- check IF WIN32 AND NOT UNIX (for cygwin)
[blender.git] / build_files / cmake / macros.cmake
index 3392398fd446c1a5004625275592cd2f7ad732cd..0da1d6c37dcf77be774a01ed4c5236f3fb2fdedb 100644 (file)
@@ -100,9 +100,9 @@ MACRO(SETUP_LIBDIRS)
                LINK_DIRECTORIES(${EXPAT_LIBPATH})
        ENDIF(WITH_OPENCOLLADA)
 
-       IF(WIN32)
+       IF(WIN32 AND NOT UNIX)
                LINK_DIRECTORIES(${PTHREADS_LIBPATH})
-       ENDIF(WIN32)
+       ENDIF(WIN32 AND NOT UNIX)
 ENDMACRO(SETUP_LIBDIRS)
 
 MACRO(SETUP_LIBLINKS
@@ -115,12 +115,12 @@ MACRO(SETUP_LIBLINKS
        IF(WITH_PYTHON)
                TARGET_LINK_LIBRARIES(${target} ${PYTHON_LINKFLAGS})
 
-               IF(WIN32)
+               IF(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
                        TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
-               ELSE(WIN32)
+               ELSE(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
-               ENDIF(WIN32)
+               ENDIF(WIN32 AND NOT UNIX)
        ENDIF(WITH_PYTHON)
 
        TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
@@ -129,9 +129,9 @@ MACRO(SETUP_LIBLINKS
        IF(WITH_INTERNATIONAL)
                TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
 
-               IF(WIN32)
+               IF(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
-               ENDIF(WIN32)
+               ENDIF(WIN32 AND NOT UNIX)
        ENDIF(WITH_INTERNATIONAL)
 
        IF(WITH_OPENAL)
@@ -156,14 +156,14 @@ MACRO(SETUP_LIBLINKS
                TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
        ENDIF(WITH_IMAGE_TIFF)
        IF(WITH_IMAGE_OPENEXR)
-               IF(WIN32)
+               IF(WIN32 AND NOT UNIX)
                        FOREACH(loop_var ${OPENEXR_LIB})
                                TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
                                TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
                        ENDFOREACH(loop_var)
-               ELSE(WIN32)
+               ELSE(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
-               ENDIF(WIN32)
+               ENDIF(WIN32 AND NOT UNIX)
        ENDIF(WITH_IMAGE_OPENEXR)
        IF(WITH_LCMS)
                TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY})
@@ -172,7 +172,7 @@ MACRO(SETUP_LIBLINKS
                TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
        ENDIF(WITH_FFMPEG)
        IF(WITH_OPENCOLLADA)
-               IF(WIN32)
+               IF(WIN32 AND NOT UNIX)
                        FOREACH(loop_var ${OPENCOLLADA_LIB})
                                TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
                                TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
@@ -183,21 +183,21 @@ MACRO(SETUP_LIBLINKS
                                TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d)
                                TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB})
                        ENDIF(EXPAT_LIB)
-               ELSE(WIN32)
+               ELSE(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
                        TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
                        TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
-               ENDIF(WIN32)
+               ENDIF(WIN32 AND NOT UNIX)
        ENDIF(WITH_OPENCOLLADA)
        IF(WITH_LCMS)
-               IF(WIN32)
+               IF(WIN32 AND NOT UNIX)
                        TARGET_LINK_LIBRARIES(${target} debug ${LCMS_LIB}_d)
                        TARGET_LINK_LIBRARIES(${target} optimized ${LCMS_LIB})
-               ENDIF(WIN32)
+               ENDIF(WIN32 AND NOT UNIX)
        ENDIF(WITH_LCMS)
-       IF(WIN32)
+       IF(WIN32 AND NOT UNIX)
                TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
-       ENDIF(WIN32)
+       ENDIF(WIN32 AND NOT UNIX)
 ENDMACRO(SETUP_LIBLINKS)
 
 MACRO(TEST_SSE_SUPPORT)