1
1
2
2
project (MacFreeRDP)
3
3
4
+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /../../../cmake/)
5
+ include (PreventInSourceBuilds)
6
+
4
7
set (MODULE_NAME "MacFreeRDP" )
5
8
set (MODULE_OUTPUT_NAME "MacFreeRDP" )
6
9
set (MODULE_PREFIX "FREERDP_CLIENT_MAC_CLIENT" )
@@ -42,19 +45,19 @@ set(${MODULE_PREFIX}_HEADERS
42
45
43
46
set (${MODULE_PREFIX} _RESOURCES ${MACOSX_BUNDLE_ICON_FILE} )
44
47
45
- # Include XIB file in Xcode resources.
48
+ # Include XIB file in Xcode resources.
46
49
if ("${CMAKE_GENERATOR} " MATCHES "Xcode" )
47
50
message (STATUS "Adding Xcode XIB resources for ${MODULE_NAME} " )
48
51
set (${MODULE_PREFIX} _RESOURCES ${${MODULE_PREFIX} _RESOURCES} ${${MODULE_PREFIX} _XIBS})
49
52
endif ()
50
53
51
54
add_executable (${MODULE_NAME}
52
- ${APP_TYPE}
55
+ ${APP_TYPE}
53
56
${${MODULE_PREFIX} _HEADERS}
54
57
${${MODULE_PREFIX} _SOURCES}
55
58
${${MODULE_PREFIX} _RESOURCES})
56
59
57
- set_target_properties (${MODULE_NAME} PROPERTIES OUTPUT_NAME "${MODULE_OUTPUT_NAME} " )
60
+ set_target_properties (${MODULE_NAME} PROPERTIES OUTPUT_NAME "${MODULE_OUTPUT_NAME} " )
58
61
add_dependencies (${MODULE_NAME} prepare-framework -headers)
59
62
60
63
# This is necessary for the xib file part below
@@ -101,11 +104,11 @@ add_custom_command(TARGET ${MODULE_NAME} POST_BUILD
101
104
# Add post-build NIB file generation in unix makefiles. XCode handles this implicitly.
102
105
if (NOT "${CMAKE_GENERATOR} " MATCHES "Xcode" )
103
106
message (STATUS "Adding post-build NIB file generation event for ${MODULE_NAME} " )
104
-
107
+
105
108
# Make sure we can find the 'ibtool' program. If we can NOT find it we skip generation of this project
106
109
find_program (IBTOOL ibtool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT} /usr/bin" )
107
110
if (${IBTOOL} STREQUAL "IBTOOL-NOTFOUND" )
108
- message (SEND_ERROR "ibtool can not be found and is needed to compile the .xib files. It should have been installed with
111
+ message (SEND_ERROR "ibtool can not be found and is needed to compile the .xib files. It should have been installed with
109
112
the Apple developer tools. The default system paths were searched in addition to ${OSX_DEVELOPER_ROOT} /usr/bin" )
110
113
endif ()
111
114
@@ -115,9 +118,9 @@ if(NOT "${CMAKE_GENERATOR}" MATCHES "Xcode")
115
118
# Compile the .xib files using the 'ibtool' program with the destination being the app package
116
119
foreach (xib ${${MODULE_PREFIX} _XIBS})
117
120
get_filename_component (XIB_WE ${xib} NAME_WE )
118
-
119
- add_custom_command (TARGET ${MODULE_NAME} POST_BUILD
120
- COMMAND ${IBTOOL} --errors --warnings --notices --output -format human-readable-text
121
+
122
+ add_custom_command (TARGET ${MODULE_NAME} POST_BUILD
123
+ COMMAND ${IBTOOL} --errors --warnings --notices --output -format human-readable-text
121
124
--compile ${CMAKE_CURRENT_BINARY_DIR} /${safe_configuration} /${MODULE_OUTPUT_NAME} .app/Contents/Resources/${XIB_WE} .nib ${CMAKE_CURRENT_SOURCE_DIR} /${xib}
122
125
COMMENT "Compiling ${xib} " )
123
126
endforeach ()
0 commit comments