Skip to content

Commit

Permalink
Only link sfml-main for the GUI examples in release mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Mar 26, 2015
1 parent 7b4610b commit 23cc8cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ macro(sfml_add_example target)
source_group("" FILES ${THIS_SOURCES})

# create the target
if(THIS_GUI_APP AND SFML_OS_WINDOWS)
if(THIS_GUI_APP AND SFML_OS_WINDOWS AND NOT DEFINED CMAKE_CONFIGURATION_TYPES AND ${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_executable(${target} WIN32 ${THIS_SOURCES})
target_link_libraries(${target} sfml-main)
else()
Expand Down
4 changes: 3 additions & 1 deletion examples/win32/Win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ LRESULT CALLBACK onEvent(HWND handle, UINT message, WPARAM wParam, LPARAM lParam
/// \return Error code
///
////////////////////////////////////////////////////////////
INT WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, INT)
int main()
{
HINSTANCE instance = GetModuleHandle(NULL);

// Define a class for our main window
WNDCLASS windowClass;
windowClass.style = 0;
Expand Down

0 comments on commit 23cc8cf

Please sign in to comment.