cmake_minimum_required (VERSION 2.6) project (MECAN) MESSAGE(${MECAN_SOURCE_DIR}) if(UNIX) add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_UNICODE -DLINUX) else(UNIX) SET(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W4 /Zm1000 /EHsc /GR /wd4512") add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_UNICODE -DWINDOWS) endif(UNIX) if(WIN32) if(release_build) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MECAN_SOURCE_DIR}/MeCan) SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D /NDEBUG /DWIN32 /D_WINDOWS /W4 /Zm1000 /EHsc /GR /wd4512") SET(win98 on) else(release_build) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MECAN_SOURCE_DIR}/MeCan) endif(release_build) else(WIN32) if(release_build) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MECAN_SOURCE_DIR}/MeCan/Release) else(release_build) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${MECAN_SOURCE_DIR}/MeCan/Debug) endif(release_build) endif(WIN32) add_subdirectory (MecanIO) add_subdirectory (MecanHardwareInterface) add_subdirectory (MecanProcessor) add_subdirectory (MecanMemory) add_subdirectory (MecanDevice) add_subdirectory (MecanLib) add_subdirectory (MeCan) option(testing "compile tests" off) option(release_build "Windows 98 Legacy extension" off) if(testing) MESSAGE("Building tests") if(UNIX) SET(CPPUNITINCL "/usr/include/cppunit") SET(CPPUNITLIB "libcppunit.so") message(STATUS ${CPPUNITLIB}) else(UNIX) SET(CPPUNITINCL ${MECAN_SOURCE_DIR}/ROOT/CppUnit/cppunit-1.12.1/include) SET(CPPUNITLIB ${MECAN_SOURCE_DIR}/ROOT/CppUnit/cppunit-1.12.1/lib/cppunitd_dll.lib) endif(UNIX) add_subdirectory (Test) endif(testing)