1 # Copyright (c) 2008 Peter Kuemmel
3 # Permission is hereby granted, free of charge, to any person
4 # obtaining a copy of this software and associated documentation
5 # files (the "Software"), to deal in the Software without
6 # restriction, including without limitation the rights to use,
7 # copy, modify, merge, publish, distribute, sublicense, and/or sell
8 # copies of the Software, and to permit persons to whom the
9 # Software is furnished to do so, subject to the following
12 # The above copyright notice and this permission notice shall be
13 # included in all copies or substantial portions of the Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 # OTHER DEALINGS IN THE SOFTWARE.
23 cmake_minimum_required(VERSION 2.6)
27 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
29 find_package(Qt4 REQUIRED)
31 include(${QT_USE_FILE})
33 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/
34 ${CMAKE_CURRENT_SOURCE_DIR}/parser
35 ${CMAKE_CURRENT_SOURCE_DIR}/parser/rpp)
37 add_definitions(-DRXX_ALLOCATOR_INIT_0 -DQT_STL)
39 set(parser_src main.cpp
42 parser/class_compiler.cpp
44 parser/codemodel_finder.cpp
45 parser/compiler_utils.cpp
47 parser/declarator_compiler.cpp
48 parser/default_visitor.cpp
52 parser/name_compiler.cpp
54 parser/smallobject.cpp
56 parser/type_compiler.cpp
58 parser/rpp/preprocessor.cpp)
61 add_executable(cpptoxml ${parser_src} )
63 target_link_libraries(cpptoxml ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
64 set_target_properties(cpptoxml PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
66 install(TARGETS cpptoxml DESTINATION bin)