diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index 2640e426ed..800225581a 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -135,9 +135,17 @@ set(GAME_HEADERS ) if(GAME_HEADERS) -add_executable(${APP_NAME} ${GAME_SRC} ${GAME_HEADERS}) + if ( WIN32 ) + add_executable(${APP_NAME} WIN32 ${GAME_SRC} ${GAME_HEADERS}) + else() + add_executable(${APP_NAME} ${GAME_SRC} ${GAME_HEADERS}) + endif ( WIN32 ) else() -add_executable(${APP_NAME} ${GAME_SRC}) + if ( WIN32 ) + add_executable(${APP_NAME} WIN32 ${GAME_SRC}) + else() + add_executable(${APP_NAME} ${GAME_SRC}) + endif ( WIN32 ) endif() target_link_libraries(${APP_NAME} cocos2d)