Move depends, build them as libs

develop
Petr Mrázek 2010-04-02 17:56:38 +02:00
parent bcbc540283
commit 2a61cec4a7
15 changed files with 44 additions and 20 deletions

@ -28,11 +28,14 @@ SET( CMAKE_SWIG_OUTDIR ${dfhack_SOURCE_DIR}/output CACHE PATH "Global output dir
include_directories (${CMAKE_SOURCE_DIR}/dfhack/include/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/shm/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/md5/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/tinyxml/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/argstream/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/md5/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/tinyxml/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/argstream/)
add_subdirectory (dfhack)
add_subdirectory (dfhack/shm)
add_subdirectory (dfhack/depends/md5)
add_subdirectory (dfhack/depends/tinyxml)
#add_subdirectory (dfhack/depends/argstream)
add_subdirectory (tools)
add_subdirectory (examples)

@ -13,15 +13,6 @@ include/DFTypes.h
include/DFVector.h
include/DFWindow.h
include/integers.h
md5/md5.h
md5/md5wrapper.h
tinyxml/tinystr.h
tinyxml/tinyxml.h
argstream/argstream.h
shm/shms.h
)
@ -31,12 +22,6 @@ DFMemInfoManager.cpp
DFHackAPI.cpp
DFTileTypes.cpp
DFVector.cpp
md5/md5.cpp
md5/md5wrapper.cpp
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
)
SET(PROJECT_HDRS_LINUX
@ -90,9 +75,9 @@ IF(UNIX)
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -pedantic")
SET(CMAKE_CXX_FLAGS "-fvisibility=hidden")
SET(PROJECT_LIBS ${X11_LIBRARY} rt)
SET(PROJECT_LIBS ${X11_LIBRARY} rt dfhack-md5 tixml-static)
ELSE(UNIX)
SET(PROJECT_LIBS psapi)
SET(PROJECT_LIBS psapi dfhack-md5 tixml-static)
ENDIF(UNIX)
ADD_LIBRARY(dfhack SHARED ${PROJECT_SRCS})

@ -0,0 +1,18 @@
# main project file. use it from a build sub-folder, see COMPILE for details
PROJECT (dfhack-md5)
cmake_minimum_required(VERSION 2.6)
# disable warning, autosearch
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
IF(NOT DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT DEFINED CMAKE_BUILD_TYPE)
ADD_LIBRARY(dfhack-md5 SHARED md5.cpp md5wrapper.cpp)

@ -0,0 +1,18 @@
# main project file. use it from a build sub-folder, see COMPILE for details
PROJECT (dfhack-tixml)
cmake_minimum_required(VERSION 2.6)
# disable warning, autosearch
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
IF(NOT DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT DEFINED CMAKE_BUILD_TYPE)
ADD_LIBRARY(tixml-static SHARED tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp)