Skip to content

Commit

Permalink
Use the WIN32 property on the example executable target.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanAtWork authored and mity committed Nov 2, 2018
1 parent be8473a commit b407ba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Expand Up @@ -47,7 +47,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--image-base -Wl,0x140000000")
endif()
elseif(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /SUBSYSTEM:WINDOWS")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
Expand Down Expand Up @@ -75,7 +75,7 @@ foreach(SOURCE ${EXAMPLE_SOURCES})
else()
set(RESOURCE example-default.rc)
endif()
add_executable(${TARGET} ${SOURCE} ${HEADER} ${RESOURCE})
add_executable(${TARGET} WIN32 ${SOURCE} ${HEADER} ${RESOURCE})

# All examples link with comctl32.dll.
target_link_libraries(${TARGET} comctl32)
Expand Down

0 comments on commit b407ba6

Please sign in to comment.