1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

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(Simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple")
set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View") set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View")
set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave") set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave")
set_target_properties(Boing Gears Particles Simple SplitView Wave PROPERTIES
FOLDER "GLFW3/Examples")
else() else()
# Set boring names for executables # Set boring names for executables
add_executable(boing WIN32 boing.c) add_executable(boing WIN32 boing.c)
@ -46,6 +49,9 @@ else()
add_executable(simple WIN32 simple.c) add_executable(simple WIN32 simple.c)
add_executable(splitview WIN32 splitview.c) add_executable(splitview WIN32 splitview.c)
add_executable(wave WIN32 wave.c) add_executable(wave WIN32 wave.c)
set_target_properties(boing gears particles simple splitview wave PROPERTIES
FOLDER "GLFW3/Examples")
endif() endif()
if (APPLE) if (APPLE)

View File

@ -5,7 +5,8 @@ include_directories("${GLFW_SOURCE_DIR}/src"
add_definitions(-D_GLFW_USE_CONFIG_H) 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/glfw3.h"
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h") "${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h")
set(common_SOURCES context.c init.c input.c monitor.c window.c) set(common_SOURCES context.c init.c input.c monitor.c window.c)
@ -57,16 +58,14 @@ if (APPLE)
endif() endif()
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS}) add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}" set_target_properties(glfw PROPERTIES
POSITION_INDEPENDENT_CODE ON) OUTPUT_NAME "${GLFW_LIB_NAME}"
VERSION ${GLFW_VERSION}
SOVERSION ${GLFW_VERSION_MAJOR}
POSITION_INDEPENDENT_CODE ON
FOLDER "GLFW3")
if (BUILD_SHARED_LIBS) 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) if (WIN32)
# The GLFW DLL needs a special compile-time macro and import library name # The GLFW DLL needs a special compile-time macro and import library name
set_target_properties(glfw PROPERTIES PREFIX "" IMPORT_PREFIX "") 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 set(CONSOLE_BINARIES clipboard defaults events fsaa gamma glfwinfo
iconify joysticks modes peter reopen cursor) iconify joysticks modes peter reopen cursor)
set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
FOLDER "GLFW3/Tests")
if (MSVC) if (MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables # Tell MSVC to use main instead of WinMain for Windows subsystem executables
set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES