diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f9dbcf7f..0da7fdbcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,9 @@ set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA set(LIB_SUFFIX "" CACHE STRING "Takes an empty string or 64. Directory where lib will be installed: lib or lib64") set_property(GLOBAL PROPERTY USE_FOLDERS ON) +if (NOT DEFINED GLFW_TARGETS_FOLDER) + set(GLFW_TARGETS_FOLDER "GLFW3") +endif() option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON) @@ -396,7 +399,7 @@ if (GLFW_INSTALL) add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${GLFW_BINARY_DIR}/cmake_uninstall.cmake") - set_target_properties(uninstall PROPERTIES FOLDER "GLFW3") + set_target_properties(uninstall PROPERTIES FOLDER "${GLFW_TARGETS_FOLDER}") endif() endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b458609fd..bc5f2762f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -49,7 +49,7 @@ set(WINDOWS_BINARIES boing gears heightmap particles sharing simple splitview wa set(CONSOLE_BINARIES offscreen) set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES - FOLDER "GLFW3/Examples") + FOLDER "${GLFW_TARGETS_FOLDER}/Examples") if (MSVC) # Tell MSVC to use main instead of WinMain for Windows subsystem executables diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22ce68f1b..7eae1cbdb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -98,7 +98,7 @@ set_target_properties(glfw PROPERTIES VERSION ${GLFW_VERSION} SOVERSION ${GLFW_VERSION_MAJOR} POSITION_INDEPENDENT_CODE ON - FOLDER "GLFW3") + FOLDER "${GLFW_TARGETS_FOLDER}") target_compile_definitions(glfw PRIVATE _GLFW_USE_CONFIG_H) target_include_directories(glfw PUBLIC diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7078b005d..a8fcdb31a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -63,7 +63,7 @@ if (VULKAN_FOUND) endif() set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES - FOLDER "GLFW3/Tests") + FOLDER "${GLFW_TARGETS_FOLDER}/Tests") if (MSVC) # Tell MSVC to use main instead of WinMain for Windows subsystem executables