-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
57 lines (36 loc) · 1.11 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 2.6)
PROJECT (xmlbeansxx)
SET(XMLBEANSXX_VERSION 0.9.8)
SET(XMLBEANSXX_SOVERSION 5.3.0)
INCLUDE(CPack)
ENABLE_TESTING()
#cmake_minimum_required(VERSION 2.4.7)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
IF(MSVC80)
SET(CMAKE_CXX_WARNING_LEVEL 1)
IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
STRING(REGEX REPLACE "/W[0-4]" "/W1"
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
ELSE(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
ENDIF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
ENDIF(MSVC80)
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(Xerces REQUIRED)
FIND_PACKAGE(Mvn REQUIRED)
IF(NOT WITHOUT_GMP)
FIND_PACKAGE(Gmp)
FIND_PACKAGE(Gmpxx)
ENDIF(NOT WITHOUT_GMP)
IF(NOT WITHOUT_LOG4CXX)
FIND_PACKAGE(Log4cxx REQUIRED)
ENDIF(NOT WITHOUT_LOG4CXX)
FIND_PACKAGE(CppUnit)
FIND_PACKAGE(LibXml2)
FIND_PACKAGE(XmlbeansxxInternal REQUIRED)
INCLUDE_DIRECTORIES (${XERCES_INCLUDE_DIR} ${CPPUNIT_INCLUDE_DIR})
ADD_SUBDIRECTORY (generator)
ADD_SUBDIRECTORY (src/xmlbeansxx)
IF(CPPUNIT_FOUND)
ADD_SUBDIRECTORY (tests)
ENDIF(CPPUNIT_FOUND)