enable building of opencsgtest, throwntogethertest, on WinXP

stl_dim
don bright 2011-10-10 21:46:27 -05:00
parent a1c698f422
commit 31592577d3
6 changed files with 42 additions and 1 deletions

View File

@ -8,6 +8,10 @@
}
}
win32 {
QMAKE_LFLAGS += -VERBOSE
}
win32 {
isEmpty(VERSION) VERSION = $$system(date /t)
} else {

View File

@ -8,6 +8,24 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
set(WIN32_STATIC_BUILD "True")
if(WIN32_STATIC_BUILD)
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(EMSG "\nTo build Win32 STATIC OpenSCAD you must run cmake .. -DCMAKE_BUILD_TYPE=Release")
set(EMSG "${EMSG} \nand replace /MD with /MT in CMakeCache.txt")
set(EMSG "${EMSG} \ni.e. sed -i s/\\/MD/\\/MT/ CMakeCache.txt")
message(FATAL_ERROR ${EMSG})
endif()
endif()
# Win32 linker debugging
# If you uncomment this, use nmake -F Makefile > log.txt
# (the link log can be several megabytes long)
if(WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -VERBOSE")
endif()
# Disable some warnings in Windows
if(WIN32)
# too long decorated names
@ -16,6 +34,8 @@ if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
# unreferenced parameters in CGAL
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100")
# fopen_s advertisement
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_DEPRECATE")
endif()
#
@ -72,9 +92,14 @@ include_directories(${OPENCSG_INCLUDE_DIR})
if ()
set(GLEW_DIR "$ENV{MACOSX_DEPLOY_DIR}")
endif()
find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_PATH})
if(WIN32_STATIC_BUILD)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLEW_STATIC")
endif()
# Flex/Bison
find_package(BISON)
find_package(FLEX)

View File

@ -16,7 +16,13 @@ IF (WIN32)
${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
# Static linked Release (non-Debug) version
NAMES glew32s.lib
# Dynamic linked Release (non-Debug) version
# NAMES glew32.lib
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin

View File

@ -41,7 +41,9 @@
#include <QFile>
#include <QDir>
#include <QSet>
#ifndef _MSC_VER
#include <getopt.h>
#endif
#include <assert.h>
#include <iostream>
#include <sstream>

View File

@ -39,7 +39,9 @@
#include <QFile>
#include <QDir>
#include <QSet>
#ifndef _MSC_VER
#include <getopt.h>
#endif
#include <assert.h>
#include <iostream>
#include <sstream>

View File

@ -39,7 +39,9 @@
#include <QFile>
#include <QDir>
#include <QSet>
#ifndef _MSC_VER
#include <getopt.h>
#endif
#include <assert.h>
#include <iostream>
#include <sstream>