Skip to content

Commit

Permalink
Reconfigure to build locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjdecker committed Jun 29, 2015
1 parent fa60ac3 commit 602cf60
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/srcSAX"]
path = src/srcSAX
url = https://github.com/srcML/srcSAX.git
37 changes: 37 additions & 0 deletions CMake/config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
##
# config.cmake
#
# Copyright (C) 2014-2015 SDML (www.sdml.info)
#
# This file is part of the srcSlice.
#
# The srcSlice is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The srcSlice is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the srcSlice; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Build configuration file

# build options
#option(BUILD_UNIT_TESTS "Build unit tests for srcSlice" ON)
#option(BUILD_EXAMPLES "Build example tests for srcSlice" ON)

# find needed libraries
find_package(LibXml2 REQUIRED)

# include needed includes
include_directories(${LIBXML2_INCLUDE_DIR})
add_definitions("-std=c++0x -O3")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
24 changes: 24 additions & 0 deletions CMake/install.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##
# install.cmake
#
# Copyright (C) 2014-2015 SDML (www.sdml.info)
#
# This file is part of the srcSlice.
#
# The srcSlice is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The srcSlice is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the srcSlice; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

if(NOT WIN32)
set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
23 changes: 23 additions & 0 deletions CMake/srcslice.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##
# srcslice.cmake
#
# Copyright (C) 2014 SDML (www.sdml.info)
#
# This file is part of the srcSlice.
#
# The srcSlice is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The srcSlice is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the srcSlice; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

include(config)
include(install)
35 changes: 31 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
set(CMAKE_CXX_FLAGS "-std=c++0x -O3")
##
# CMakeLists.txt
#
# Copyright (C) 2015 SDML (www.sdml.info)
#
# This file is part of the srcSlice.
#
# The srcSlice is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# The srcSlice is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the srcSlice; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Build configuration file

SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build)
cmake_minimum_required(VERSION 2.8)
project(srcSlice)

include_directories(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/srcSAX/src/srcsax ${CMAKE_SOURCE_DIR}/srcSAX/src/cpp src/headers src/cpp)
enable_testing()

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
include(srcslice)

include_directories(src/headers src/cpp
src/srcSAX/src/srcsax src/srcSAX/src/cpp src/srcSAX/src/windows)

add_subdirectory(src)
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
file(GLOB SRCSAXHANDLER_SOURCE ../../srcSAX/src/srcsax/*.cpp ../../srcSAX/src/cpp/*.cpp)
file(GLOB SRCSAXHANDLER_INCLUDE ../../srcSAX/src/srcsax/*.h* ../../srcSAX/src/cpp/*.h*)
add_subdirectory(srcSAX/src)

file(GLOB SRCSLICEHANDLER_SOURCE cpp/*.cpp)
file(GLOB SRCSLICEHANDLER_INCLUDE headers/*.hpp)

Expand Down
1 change: 1 addition & 0 deletions src/srcSAX
Submodule srcSAX added at 6032c5

0 comments on commit 602cf60

Please sign in to comment.