|
|
@ -1,6 +1,5 @@ |
|
|
|
|
|
|
|
|
|
|
|
configure_file( |
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libglfw.pc.cmake |
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libglfw.pc.cmake |
|
|
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/libglfw.pc @ONLY) |
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/libglfw.pc @ONLY) |
|
|
|
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} |
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} |
|
|
@ -8,8 +7,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} |
|
|
|
${GLFW_BINARY_DIR}/src |
|
|
|
${GLFW_BINARY_DIR}/src |
|
|
|
${GLFW_INCLUDE_DIR}) |
|
|
|
${GLFW_INCLUDE_DIR}) |
|
|
|
|
|
|
|
|
|
|
|
set(cocoa_SOURCES |
|
|
|
set(cocoa_SOURCES cocoa_enable.m |
|
|
|
cocoa_enable.m |
|
|
|
|
|
|
|
cocoa_fullscreen.m |
|
|
|
cocoa_fullscreen.m |
|
|
|
cocoa_glext.m |
|
|
|
cocoa_glext.m |
|
|
|
cocoa_init.m |
|
|
|
cocoa_init.m |
|
|
@ -20,17 +18,14 @@ set(cocoa_SOURCES |
|
|
|
# For some reason, CMake doesn't know about .m |
|
|
|
# For some reason, CMake doesn't know about .m |
|
|
|
set_source_files_properties(${cocoa_SOURCES} PROPERTIES LANGUAGE C) |
|
|
|
set_source_files_properties(${cocoa_SOURCES} PROPERTIES LANGUAGE C) |
|
|
|
|
|
|
|
|
|
|
|
set(libglfw_SOURCES |
|
|
|
set(libglfw_SOURCES ${common_SOURCES} ${cocoa_SOURCES}) |
|
|
|
${common_SOURCES} |
|
|
|
|
|
|
|
${cocoa_SOURCES}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library(libglfwStatic STATIC ${libglfw_SOURCES}) |
|
|
|
add_library(libglfwStatic STATIC ${libglfw_SOURCES}) |
|
|
|
add_library(libglfwShared SHARED ${libglfw_SOURCES}) |
|
|
|
add_library(libglfwShared SHARED ${libglfw_SOURCES}) |
|
|
|
target_link_libraries(libglfwShared ${GLFW_LIBRARIES}) |
|
|
|
target_link_libraries(libglfwShared ${GLFW_LIBRARIES}) |
|
|
|
set_target_properties(libglfwStatic libglfwShared PROPERTIES |
|
|
|
set_target_properties(libglfwStatic libglfwShared PROPERTIES |
|
|
|
CLEAN_DIRECT_OUTPUT 1 |
|
|
|
CLEAN_DIRECT_OUTPUT 1 |
|
|
|
OUTPUT_NAME glfw |
|
|
|
OUTPUT_NAME glfw) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Append -fno-common to the compile flags to work around a bug in the Apple GCC |
|
|
|
# Append -fno-common to the compile flags to work around a bug in the Apple GCC |
|
|
|
get_target_property(CFLAGS libglfwShared COMPILE_FLAGS) |
|
|
|
get_target_property(CFLAGS libglfwShared COMPILE_FLAGS) |
|
|
|