Initial commit
[minnow.git] / CMakeLists.txt
blob7ccdc3d0454755d5bcf6271438e48c83efd30e70
1 cmake_minimum_required(VERSION 2.6)
3 SET(CMAKE_BUILD_TYPE gdb)
4 SET(CMAKE_CXX_FLAGS_GDB " -Wall -ggdb -O3")
5 SET(CMAKE_C_FLAGS_GDB " -Wall -ggdb -O3")
7 PROJECT (minnow)
9 INCLUDE (FindDoxygen)
11 SET(Boost_USE_STATIC_LIBS ON)
12 SET(Boost_USE_MULTITHREAD ON)
14 #For MinGW+Boost install
15 IF (WIN32)
16    SET(BOOST_ROOT c:/MinGW)
17    SET(BOOST_INCLUDEDIR c:/MinGW/include)
18    SET(BOOST_LIBRARYDIR c:/MinGW/lib)
19 ENDIF (WIN32)
21 FIND_PACKAGE(Boost 1.35.0 REQUIRED COMPONENTS thread program_options )
23 IF (DOXYGEN_FOUND)
24    MESSAGE(STATUS "Running doxygen...")
25    EXECUTE_PROCESS(COMMAND ${DOXYGEN_EXECUTABLE} OUTPUT_QUIET)
26 ENDIF (DOXYGEN_FOUND)
28 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} src/aquarium src/minnow)
29 SET (AQUARIUM_SRCS src/aquarium/aquarium.cpp)
30 SET (MINNOW_SRCS src/minnow/main.cpp src/minnow/parser.cpp src/minnow/codegen_cppoutput.cpp src/minnow/lexer.cpp)
32 ADD_LIBRARY (aquarium SHARED ${AQUARIUM_SRCS})
33 TARGET_LINK_LIBRARIES (aquarium debug ${Boost_LIBRARIES} optimized ${Boost_LIBRARIES})
35 ADD_EXECUTABLE (minnow ${MINNOW_SRCS})
36 TARGET_LINK_LIBRARIES (minnow debug ${Boost_LIBRARIES} optimized ${Boost_LIBRARIES})