cmake mingw32 example added
This commit is contained in:
parent
73bfeb28b9
commit
12f49ce0e9
|
@ -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)
|
|
@ -0,0 +1,3 @@
|
||||||
|
add_executable (myapp main.c)
|
||||||
|
|
||||||
|
#target_link_libraries (myapp ${QT_LIBRARIES})
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
puts ("Hello world!\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue