Skip to content

Commit bdac232

Browse files
committed
Use shorter executable name
1 parent bc571e8 commit bdac232

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ FetchContent_Declare(SFML
1010
GIT_TAG 2.6.x)
1111
FetchContent_MakeAvailable(SFML)
1212

13-
add_executable(CMakeSFMLProject src/main.cpp)
14-
target_link_libraries(CMakeSFMLProject PRIVATE sfml-graphics)
15-
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_17)
13+
add_executable(main src/main.cpp)
14+
target_link_libraries(main PRIVATE sfml-graphics)
15+
target_compile_features(main PRIVATE cxx_std_17)
1616

1717
if(WIN32)
1818
add_custom_command(
19-
TARGET CMakeSFMLProject
19+
TARGET main
2020
COMMENT "Copy OpenAL DLL"
21-
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:CMakeSFMLProject>
21+
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:main>
2222
VERBATIM)
2323
endif()
2424

25-
install(TARGETS CMakeSFMLProject)
25+
install(TARGETS main)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The template starts out very basic, but might receive additional features over t
1313
1. Install Git and CMake. Use your system's package manager if available.
1414
1. Follow the above instructions about how to use GitHub's project template feature to create your own project.
1515
1. Clone your new GitHub repo and open the repo in your text editor of choice.
16-
1. Open [CMakeLists.txt](CMakeLists.txt). Rename the project and the executable to whatever name you want. The project and executable names don't have to match.
16+
1. Open [CMakeLists.txt](CMakeLists.txt). Rename the project and the executable to whatever name you want.
1717
1. If you want to add or remove any .cpp files, change the source files listed in the [`add_executable`](CMakeLists.txt#L10) call in CMakeLists.txt to match the source files your project requires. If you plan on keeping the default main.cpp file then no changes are required.
1818
1. If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:
1919
```

0 commit comments

Comments
 (0)