mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Organized projects into folders, for IDEs that support it (e.g. Visual Studio)
This commit is contained in:
parent
b85bf692c0
commit
ef78b6d0f3
@ -82,7 +82,7 @@ endif()
|
|||||||
# disable the rpath stuff
|
# disable the rpath stuff
|
||||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||||
|
|
||||||
# Setup Mac OS X stuff
|
# setup Mac OS X stuff
|
||||||
if(MACOSX)
|
if(MACOSX)
|
||||||
# SFML_BUILD_FRAMEWORKS needs two things :
|
# SFML_BUILD_FRAMEWORKS needs two things :
|
||||||
# first, it's available only for release
|
# first, it's available only for release
|
||||||
@ -123,6 +123,10 @@ if(LINUX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# enable project folders
|
||||||
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
|
||||||
|
|
||||||
# add the subdirectories
|
# add the subdirectories
|
||||||
add_subdirectory(src/SFML)
|
add_subdirectory(src/SFML)
|
||||||
if(SFML_BUILD_EXAMPLES)
|
if(SFML_BUILD_EXAMPLES)
|
||||||
|
@ -139,6 +139,9 @@ macro(sfml_add_library target)
|
|||||||
set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR})
|
set_target_properties(${target} PROPERTIES SOVERSION ${VERSION_MAJOR})
|
||||||
set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
set_target_properties(${target} PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||||
|
|
||||||
|
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||||
|
set_target_properties(${target} PROPERTIES FOLDER "SFML")
|
||||||
|
|
||||||
# for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled
|
# for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled
|
||||||
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
||||||
if(NOT GCC_VERSION VERSION_LESS "4")
|
if(NOT GCC_VERSION VERSION_LESS "4")
|
||||||
@ -146,7 +149,7 @@ macro(sfml_add_library target)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If using gcc >= 4.0 or clang >= 3.0 on a non-Windows platform, we must hide public symbols by default
|
# if using gcc >= 4.0 or clang >= 3.0 on a non-Windows platform, we must hide public symbols by default
|
||||||
# (exported ones are explicitely marked)
|
# (exported ones are explicitely marked)
|
||||||
if(NOT WINDOWS AND ((COMPILER_GCC AND NOT GCC_VERSION VERSION_LESS "4") OR (COMPILER_CLANG AND NOT CLANG_VERSION VERSION_LESS "3")))
|
if(NOT WINDOWS AND ((COMPILER_GCC AND NOT GCC_VERSION VERSION_LESS "4") OR (COMPILER_CLANG AND NOT CLANG_VERSION VERSION_LESS "3")))
|
||||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden)
|
set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden)
|
||||||
@ -219,6 +222,9 @@ macro(sfml_add_example target)
|
|||||||
# set the debug suffix
|
# set the debug suffix
|
||||||
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
set_target_properties(${target} PROPERTIES DEBUG_POSTFIX -d)
|
||||||
|
|
||||||
|
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||||
|
set_target_properties(${target} PROPERTIES FOLDER "Examples")
|
||||||
|
|
||||||
# for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled
|
# for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled
|
||||||
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
||||||
if(NOT GCC_VERSION VERSION_LESS "4")
|
if(NOT GCC_VERSION VERSION_LESS "4")
|
||||||
|
@ -14,5 +14,8 @@ set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d)
|
|||||||
# insert the major version number in the output filename
|
# insert the major version number in the output filename
|
||||||
set_target_properties(sfml-main PROPERTIES OUTPUT_NAME "sfml-main")
|
set_target_properties(sfml-main PROPERTIES OUTPUT_NAME "sfml-main")
|
||||||
|
|
||||||
|
# set the target's folder (for IDEs that support it, e.g. Visual Studio)
|
||||||
|
set_target_properties(sfml-main PROPERTIES FOLDER "SFML")
|
||||||
|
|
||||||
# setup the install rule
|
# setup the install rule
|
||||||
install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel)
|
install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel)
|
||||||
|
Loading…
Reference in New Issue
Block a user