cmake mingw32 example added

This commit is contained in:
Kolan Sh 2012-05-24 12:57:11 +04:00
parent 73bfeb28b9
commit 12f49ce0e9
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,27 @@
project (HELLO)
cmake_minimum_required (VERSION 2.6)
message(STATUS "System: " ${CMAKE_SYSTEM_NAME} " " ${CMAKE_SYSTEM_VERSION})
message(STATUS "Processor: " ${CMAKE_HOST_SYSTEM_PROCESSOR})
if(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
if(MSVC)
message(STATUS "Compiler: MSVC, version: " ${MSVC_VERSION})
endif(MSVC)
if(BORLAND)
message(STATUS "Compiler: BCC")
endif(BORLAND)
if(MINGW)
message(STATUS "Compiler: MinGW")
endif(MINGW)
else(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
message(STATUS "Only GCC is supported on Linux")
endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
message(STATUS "CMake generates " ${CMAKE_GENERATOR})
#find_package(Qt4 REQUIRED)
#include(${QT_USE_FILE})
add_subdirectory(srcapp)

View File

@ -0,0 +1,3 @@
add_executable (myapp main.c)
#target_link_libraries (myapp ${QT_LIBRARIES})

View File

@ -0,0 +1,8 @@
#include <stdio.h>
int main (void)
{
puts ("Hello world!\n");
return 0;
}