From 5f6aa9c34c0b7609d1bd19d296f606fe9f9e8a8c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 4 Jan 2015 23:23:16 +0100 Subject: [PATCH] Added IDE folders to CMake files. Fixes #328. --- examples/CMakeLists.txt | 6 ++++++ src/CMakeLists.txt | 17 ++++++++--------- tests/CMakeLists.txt | 3 +++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index ddb26780..92e2cac3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -37,6 +37,9 @@ if (APPLE) set_target_properties(Simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple") set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View") set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave") + + set_target_properties(Boing Gears Particles Simple SplitView Wave PROPERTIES + FOLDER "GLFW3/Examples") else() # Set boring names for executables add_executable(boing WIN32 boing.c) @@ -46,6 +49,9 @@ else() add_executable(simple WIN32 simple.c) add_executable(splitview WIN32 splitview.c) add_executable(wave WIN32 wave.c) + + set_target_properties(boing gears particles simple splitview wave PROPERTIES + FOLDER "GLFW3/Examples") endif() if (APPLE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9ba9fc56..77a8501f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,8 @@ include_directories("${GLFW_SOURCE_DIR}/src" add_definitions(-D_GLFW_USE_CONFIG_H) -set(common_HEADERS "${GLFW_BINARY_DIR}/src/glfw_config.h" internal.h +set(common_HEADERS internal.h + "${GLFW_BINARY_DIR}/src/glfw_config.h" "${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h" "${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h") set(common_SOURCES context.c init.c input.c monitor.c window.c) @@ -57,16 +58,14 @@ if (APPLE) endif() add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS}) -set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}" - POSITION_INDEPENDENT_CODE ON) +set_target_properties(glfw PROPERTIES + OUTPUT_NAME "${GLFW_LIB_NAME}" + VERSION ${GLFW_VERSION} + SOVERSION ${GLFW_VERSION_MAJOR} + POSITION_INDEPENDENT_CODE ON + FOLDER "GLFW3") if (BUILD_SHARED_LIBS) - # Include version information in the output - set_target_properties(glfw PROPERTIES VERSION ${GLFW_VERSION}) - if (UNIX) - set_target_properties(glfw PROPERTIES SOVERSION ${GLFW_VERSION_MAJOR}) - endif() - if (WIN32) # The GLFW DLL needs a special compile-time macro and import library name set_target_properties(glfw PROPERTIES PREFIX "" IMPORT_PREFIX "") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c327eb24..a5f52474 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,9 @@ set(WINDOWS_BINARIES accuracy empty sharing tearing threads title windows cursor set(CONSOLE_BINARIES clipboard defaults events fsaa gamma glfwinfo iconify joysticks modes peter reopen cursor) +set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES + FOLDER "GLFW3/Tests") + if (MSVC) # Tell MSVC to use main instead of WinMain for Windows subsystem executables set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES