Skip to content

Commit 2d778a4

Browse files
committed
- revamp project
1 parent 67d0b36 commit 2d778a4

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
cmake_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-
73
project(ColorPicker)
4+
85
set(BUILD_SHARED_LIBS FALSE)
96
set(SFML_BUILD_AUDIO FALSE)
107
set(SFML_BUILD_DOC FALSE)
@@ -17,15 +14,20 @@ set(SFML_INSTALL_PKGCONFIG_FILES FALSE)
1714
set(SFML_OPENGL_ES FALSE)
1815
set(SFML_USE_STATIC_STD_LIBS FALSE)
1916
set(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
2727
SET(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)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
ColorPicker
22
===========
3+
### Notes
4+
- DOES NOT use Clang
35

46
### Reference
57
- https://github.com/SFML/SFML/blob/master/examples/win32/Win32.cpp

local-build.cmd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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.

0 commit comments

Comments
 (0)