mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
CMake for Apple Xcode usability improvements
This commit is contained in:
@@ -68,6 +68,14 @@ endif (WIN32 AND NOT CYGWIN)
|
|||||||
include(TestBigEndian)
|
include(TestBigEndian)
|
||||||
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
||||||
|
|
||||||
|
if (CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
|
if (${XCODE_VERSION} VERSION_GREATER_EQUAL 3.9) # CMake 3.9 and up
|
||||||
|
# Tell Xcode to regenerate scheme information automatically whenever the
|
||||||
|
# CMake configuartion changes without asking the user
|
||||||
|
set (CMAKE_XCODE_GENERATE_SCHEME 1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set (HAVE_STRCASECMP 1)
|
set (HAVE_STRCASECMP 1)
|
||||||
set (HAVE_DIRENT_H 1)
|
set (HAVE_DIRENT_H 1)
|
||||||
|
|||||||
+25
-2
@@ -37,18 +37,41 @@ set (CPPFILES
|
|||||||
widget_panel.cxx
|
widget_panel.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# also list header files in Apple's Xcode IDE
|
||||||
|
|
||||||
|
set (HEADERFILES
|
||||||
|
CodeEditor.h
|
||||||
|
Fl_Type.h
|
||||||
|
Fl_Widget_Type.h
|
||||||
|
Fluid_Image.h
|
||||||
|
Shortcut_Button.h
|
||||||
|
StyleParse.h
|
||||||
|
about_panel.h
|
||||||
|
alignment_panel.h
|
||||||
|
comments.h
|
||||||
|
function_panel.h
|
||||||
|
print_panel.h
|
||||||
|
template_panel.h
|
||||||
|
undo.h
|
||||||
|
widget_panel.h
|
||||||
|
)
|
||||||
|
|
||||||
# ExternalCodeEditor: platform specific files
|
# ExternalCodeEditor: platform specific files
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list (APPEND CPPFILES ExternalCodeEditor_WIN32.cxx)
|
list (APPEND CPPFILES ExternalCodeEditor_WIN32.cxx)
|
||||||
|
list (APPEND HEADERFILES ExternalCodeEditor_WIN32.h)
|
||||||
else ()
|
else ()
|
||||||
list (APPEND CPPFILES ExternalCodeEditor_UNIX.cxx)
|
list (APPEND CPPFILES ExternalCodeEditor_UNIX.cxx)
|
||||||
|
list (APPEND HEADERFILES ExternalCodeEditor_UNIX.h)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
|
source_group("Header Files" FILES ${HEADERFILES})
|
||||||
|
|
||||||
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
||||||
set (ICON_NAME fluid.icns)
|
set (ICON_NAME fluid.icns)
|
||||||
set (ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_NAME}")
|
set (ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_NAME}")
|
||||||
add_executable (fluid MACOSX_BUNDLE ${CPPFILES} ${ICON_PATH})
|
add_executable (fluid MACOSX_BUNDLE ${CPPFILES} ${HEADERFILES} ${ICON_PATH})
|
||||||
|
|
||||||
# create macOS bundle wrapper script
|
# create macOS bundle wrapper script
|
||||||
|
|
||||||
@@ -64,7 +87,7 @@ if (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
|||||||
unset (WRAPPER)
|
unset (WRAPPER)
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
add_executable (fluid WIN32 ${CPPFILES})
|
add_executable (fluid WIN32 ${CPPFILES} ${HEADERFILES})
|
||||||
endif (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
endif (APPLE AND (NOT OPTION_APPLE_X11) AND (NOT OPTION_APPLE_SDL))
|
||||||
|
|
||||||
target_link_libraries (fluid fltk fltk_images fltk_forms)
|
target_link_libraries (fluid fltk fltk_images fltk_forms)
|
||||||
|
|||||||
Reference in New Issue
Block a user