Commit a98051ba authored by sairuk's avatar sairuk
Browse files

Can now pass -DTARGET to cmake to select build profile from cmake directory

parent b085c193
cmake_minimum_required (VERSION 2.6.2)
project (cannonball)
set(DCMAKE default.cmake)
set(CMDIR cmake)
# Uncomment for debug output
#set(Boost_DEBUG 1)
......@@ -8,7 +10,19 @@ project (cannonball)
set(main_cpp_base ../src/main)
# Include relevant CMAKE file (default, mingw, pandora etc.)
include(default.cmake)
if(TARGET)
set(TCMAKE ${TARGET}.cmake)
if(EXISTS ${CMDIR}/${TCMAKE})
message("CMake files for ${TARGET} found, using ${TCMAKE}")
include(${TCMAKE})
else()
message("CMake files for ${TARGET} not found, using ${DCMAKE}")
include(${DCMAKE})
endif()
else()
message("TARGET not passed, using ${DCMAKE}")
include(${DCMAKE})
endif(TARGET)
set(BOOST_INCLUDEDIR ${lib_base}/boost_1_51_0)
find_package(Boost REQUIRED)
......@@ -179,4 +193,4 @@ add_executable(cannonball ${SRCS})
# Copy Configuration file to current build
configure_file(../res/config.xml ./config.xml
COPYONLY
)
\ No newline at end of file
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment