File tree Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Expand file tree Collapse file tree 4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.14)
22
3- # uncomment these 2 lines if using clang
4- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target x86_64-w64-mingw32" )
5- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target x86_64-w64-mingw32" )
6-
73project (ColorPicker)
4+
85set (BUILD_SHARED_LIBS FALSE )
96set (SFML_BUILD_AUDIO FALSE )
107set (SFML_BUILD_DOC FALSE )
@@ -17,15 +14,20 @@ set(SFML_INSTALL_PKGCONFIG_FILES FALSE)
1714set (SFML_OPENGL_ES FALSE )
1815set (SFML_USE_STATIC_STD_LIBS FALSE )
1916set (SFML_USE_SYSTEM_DEPS TRUE )
17+ set (SFML_STATIC_LIBRARIES TRUE )
2018
21- add_subdirectory ("SFML" )
19+ find_package (SFML 2.5.1 COMPONENTS system window graphics REQUIRED PATHS
20+ "P:\\ Downloads\\ cpp-libraries\\ SFML\\ build\\ sfml\\ lib\\ cmake\\ SFML"
21+ )
2222
2323# uncomment this line if using msvc
2424# SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows /ENTRY:mainCRTStartup")
2525
2626# uncomment this line if using clang
2727SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -Wl,--subsystem,windows" )
2828
29- add_executable (ColorPicker main.cpp)
29+ add_executable (ColorPicker
30+ "src/main.cpp"
31+ )
3032
31- target_link_libraries (ColorPicker sfml-graphics)
33+ target_link_libraries (ColorPicker sfml-graphics)
Original file line number Diff line number Diff line change 11ColorPicker
22===========
3+ ### Notes
4+ - DOES NOT use Clang
35
46### Reference
57- https://github.com/SFML/SFML/blob/master/examples/win32/Win32.cpp
Original file line number Diff line number Diff line change 1+ REM run as Administrator
2+ @ echo off
3+ cd /d %~dp0
4+ set DOWNLOAD_DIR = %USERPROFILE% \Downloads
5+ set DOWNLOAD_DIR_LINUX = %DOWNLOAD_DIR:\ =/ %
6+ SET PATH = %DOWNLOAD_DIR% \PortableGit\bin;%DOWNLOAD_DIR% \mingw64;%DOWNLOAD_DIR% \mingw64\bin;%DOWNLOAD_DIR% \cmake-3.22.0-rc1-windows-x86_64\bin;%PATH%
7+ cmake.exe -G" MinGW Makefiles" -B./build
8+ cd build
9+
10+ :rebuild_and_startapp
11+ mingw32-make.exe
12+ pause
13+ REM GOTO rebuild_and_startapp
File renamed without changes.
You can’t perform that action at this time.
0 commit comments