mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +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
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
|
||||
# Setup Mac OS X stuff
|
||||
# setup Mac OS X stuff
|
||||
if(MACOSX)
|
||||
# SFML_BUILD_FRAMEWORKS needs two things :
|
||||
# first, it's available only for release
|
||||
@ -123,6 +123,10 @@ if(LINUX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# enable project folders
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
|
||||
|
||||
# add the subdirectories
|
||||
add_subdirectory(src/SFML)
|
||||
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 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
|
||||
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
||||
if(NOT GCC_VERSION VERSION_LESS "4")
|
||||
@ -146,7 +149,7 @@ macro(sfml_add_library target)
|
||||
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)
|
||||
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)
|
||||
@ -219,6 +222,9 @@ macro(sfml_add_example target)
|
||||
# set the debug suffix
|
||||
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
|
||||
if(WINDOWS AND COMPILER_GCC AND SFML_USE_STATIC_STD_LIBS)
|
||||
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
|
||||
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
|
||||
install(TARGETS sfml-main ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT devel)
|
||||
|
Loading…
Reference in New Issue
Block a user