diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..5a9a38a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Build folders +build/ + +# Cache/IDE folders +.cache/ +.vscode/ +.idea/ diff --git a/CMakeLists.txt b/CMakeLists.txt index b4fa9a6c..0acaf521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0.2) +cmake_minimum_required(VERSION 3.7.2) # define a macro that helps defining an option macro(csfml_set_option var default type docstring) @@ -13,16 +13,11 @@ endmacro() csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)") # project name -project(CSFML) +project(CSFML VERSION 2.5.1) # include the configuration file include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake) -# setup version numbers -set(VERSION_MAJOR 2) -set(VERSION_MINOR 5) -set(VERSION_PATCH 1) - # add the CSFML header path include_directories(${PROJECT_SOURCE_DIR}/include) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index bb7cd36c..111e7e32 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -38,26 +38,6 @@ endif() # - GNUCXX can still be set on macOS when using Clang if(MSVC) set(SFML_COMPILER_MSVC 1) - - if(MSVC_VERSION EQUAL 1400) - set(SFML_MSVC_VERSION 8) - elseif(MSVC_VERSION EQUAL 1500) - set(SFML_MSVC_VERSION 9) - elseif(MSVC_VERSION EQUAL 1600) - set(SFML_MSVC_VERSION 10) - elseif(MSVC_VERSION EQUAL 1700) - set(SFML_MSVC_VERSION 11) - elseif(MSVC_VERSION EQUAL 1800) - set(SFML_MSVC_VERSION 12) - elseif(MSVC_VERSION EQUAL 1900) - set(SFML_MSVC_VERSION 14) - elseif(MSVC_VERSION LESS_EQUAL 1919) - set(SFML_MSVC_VERSION 15) - elseif(MSVC_VERSION LESS_EQUAL 1929) - set(SFML_MSVC_VERSION 16) - elseif(MSVC_VERSION LESS_EQUAL 1939) - set(SFML_MSVC_VERSION 17) - endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(SFML_COMPILER_CLANG 1) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 99417676..5f4072e8 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -20,7 +20,7 @@ macro(csfml_add_library target) if(SFML_OS_WINDOWS) # include the major version number in Windows shared library names (but not import library names) set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d) - set_target_properties(${target} PROPERTIES SUFFIX "-${VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") + set_target_properties(${target} PROPERTIES SUFFIX "-${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") else() set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d) endif() @@ -32,8 +32,8 @@ macro(csfml_add_library target) endif() # set the version and soversion of the target (for compatible systems -- mostly Linuxes) - set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}) - set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) + set_target_properties(${target} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) + set_target_properties(${target} PROPERTIES VERSION ${PROJECT_VERSION}) # set the target's folder (for IDEs that support it, e.g. Visual Studio) set_target_properties(${target} PROPERTIES FOLDER "CSFML") diff --git a/doc/doxyfile.in b/doc/doxyfile.in index 1ca19074..f087f201 100644 --- a/doc/doxyfile.in +++ b/doc/doxyfile.in @@ -38,7 +38,7 @@ PROJECT_NAME = CSFML # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ +PROJECT_NUMBER = @PROJECT_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/src/SFML/CMakeLists.txt b/src/SFML/CMakeLists.txt index ee93719c..bac6724b 100644 --- a/src/SFML/CMakeLists.txt +++ b/src/SFML/CMakeLists.txt @@ -21,7 +21,7 @@ if(CSFML_LINK_SFML_STATICALLY) set(SFML_STATIC_LIBRARIES TRUE) add_definitions(-DSFML_STATIC) endif() -find_package(SFML 2 COMPONENTS network graphics audio REQUIRED) +find_package(SFML 2.5 COMPONENTS network graphics audio REQUIRED) # add the modules subdirectories add_subdirectory(System)