Skip to content

Commit 5bac26d

Browse files
author
Will Sobel
committed
Migrated to vs 2013 (v120) and updated libxml2 to v 2.9.
1 parent b4025ff commit 5bac26d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1726
-3794
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ Release
66
*.suo
77
*.ncb
88
*.user
9+
test/agent.log*

agent/CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,30 @@ set (AGENT_VERSION_BUILD 0)
1313
set (AGENT_VERSION_RC "_RC17")
1414

1515
if(WIN32)
16-
# For windows XP use: cmake -G "Visual Studio 11" -T v110_xp -D WINVER=0x0501
16+
# For windows XP use: cmake -G "Visual Studio 12" -T v120_xp -D WINVER=0x0501
1717
# for XP targeting
18-
# For windows Vista+ use: cmake -G "Visual Studio 11" -T v110 -D WINVER=0x0601
18+
# For windows Vista+ use: cmake -G "Visual Studio 12" -T v120 -D WINVER=0x0601
1919
# for XP targeting
2020

2121
if(CMAKE_CL_64)
22+
set(bits 64)
2223
foreach(flag_var
2324
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
2425
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
2526
if(${flag_var} MATCHES "WIN32")
2627
string(REGEX REPLACE "32" "64" ${flag_var} "${${flag_var}}")
2728
endif(${flag_var} MATCHES "WIN32")
28-
endforeach(flag_var)
29-
30-
file(GLOB LibXML2_LIBRARIES ../win32/libxml2-2.7.7/lib/libxml2_64.lib)
31-
file(GLOB LibXML2_DEBUG_LIBRARIES ../win32/libxml2-2.7.7/lib/libxml2_64d.lib)
29+
endforeach(flag_var)
3230
else(CMAKE_CL_64)
33-
file(GLOB LibXML2_LIBRARIES ../win32/libxml2-2.7.7/lib/libxml2.lib)
34-
file(GLOB LibXML2_DEBUG_LIBRARIES ../win32/libxml2-2.7.7/lib/libxml2d.lib)
35-
endif(CMAKE_CL_64)
31+
set(bits 32)
32+
endif(CMAKE_CL_64)
33+
34+
file(GLOB LibXML2_LIBRARIES "../win32/libxml2-2.9/lib/libxml2_a_v120_${bits}.lib")
35+
file(GLOB LibXML2_DEBUG_LIBRARIES ../win32/libxml2-2.9/lib/libxml2d_a_v120_${bits}.lib)
36+
3637
add_library(libxml2 STATIC IMPORTED)
37-
set(LibXML2_INCLUDE_DIRS ../win32/libxml2-2.7.7/include )
38+
set(LibXML2_INCLUDE_DIRS ../win32/libxml2-2.9/include )
39+
3840
set_property(TARGET libxml2 PROPERTY IMPORTED_LOCATION_RELEASE ${LibXML2_LIBRARIES})
3941
set_property(TARGET libxml2 PROPERTY IMPORTED_LOCATION_DEBUG ${LibXML2_DEBUG_LIBRARIES})
4042
endif(WIN32)

agent/service.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ void MTConnectService::install()
163163
SC_HANDLE manager;
164164
SC_HANDLE service;
165165
char path[MAX_PATH];
166-
char *commandLine;
167-
168166

169167
if( !GetModuleFileName(NULL, path, MAX_PATH ) )
170168
{

test/CMakeLists.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ set(CMAKE_FIND_FRAMEWORK NEVER FORCE)
77
set(CMAKE_FIND_APPBUNDLE NEVER)
88

99
if(WIN32)
10-
set(LibXML2_INCLUDE_DIRS ../win32/libxml2-2.7.7/include )
11-
file(GLOB LibXML2_LIBRARIES ../win32/libxml2-2.7.7/lib/libxml2_a_dll.lib )
10+
set(LibXML2_INCLUDE_DIRS ../win32/libxml2-2.9/include )
11+
12+
if(CMAKE_CL_64)
13+
set(bits 64)
14+
else(CMAKE_CL_64)
15+
set(bits 32)
16+
endif(CMAKE_CL_64)
17+
18+
file(GLOB LibXML2_LIBRARIES "../win32/libxml2-2.9/lib/libxml2_a_v120_${bits}.lib")
19+
file(GLOB LibXML2_DEBUG_LIBRARIES ../win32/libxml2-2.9/lib/libxml2d_a_v120_${bits}.lib)
20+
1221
set(CPPUNIT_INCLUDE_DIR ../win32/cppunit-1.12.1/include)
13-
file(GLOB CPPUNIT_LIBRARY ../win32/cppunit-1.12.1/lib/cppunitd_dll.lib)
22+
file(GLOB CPPUNIT_LIBRARY ../win32/cppunit-1.12.1/lib/cppunitd_v120_a.lib)
1423
endif(WIN32)
1524

1625
if(UNIX)
@@ -74,6 +83,14 @@ include_directories(${LibXML2_INCLUDE_DIRS} ${CPPUNIT_INCLUDE_DIR})
7483
if(WIN32)
7584
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
7685
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
86+
87+
foreach(flag_var
88+
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
89+
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
90+
if(${flag_var} MATCHES "/MD")
91+
string(REGEX REPLACE "/MD[d]?" "/MTd" ${flag_var} "${${flag_var}}")
92+
endif(${flag_var} MATCHES "/MD")
93+
endforeach(flag_var)
7794
endif(WIN32)
7895

7996
add_executable(agent_test ${test_srcs} ${test_headers})
-402 KB
Binary file not shown.
-6 MB
Binary file not shown.
-644 KB
Binary file not shown.
-197 KB
Binary file not shown.
-4.1 MB
Binary file not shown.
-819 KB
Binary file not shown.

0 commit comments

Comments
 (0)