Added IDE folders to CMake files.

Fixes #328.
This commit is contained in:
Camilla Berglund 2015-01-04 23:23:16 +01:00
parent 893e03e5d2
commit 5f6aa9c34c
3 changed files with 17 additions and 9 deletions

View File

@ -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)

View File

@ -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 "")

View File

@ -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