mirror of https://github.com/axmolengine/axmol.git
Update CMakeLists.txt
Add WIN32 property to add_executable function to prevent the following error on Windows
`MSVCRTD.lib(crtexe.obj)👎 error: LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup`
This commit is contained in:
parent
3269df546c
commit
6433a69ed1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue