macOS can now build in debug mode, and can be built outside of a bundle
This commit is contained in:
parent
c5ba20173b
commit
aa98e6e6d0
3 changed files with 26 additions and 20 deletions
|
|
@ -24,6 +24,7 @@ option(USE_MEMORYSAN "Enable Memory Sanitizer" OFF)
|
||||||
option(NO_CONAN_BUILD "Not using conan to get packages" OFF)
|
option(NO_CONAN_BUILD "Not using conan to get packages" OFF)
|
||||||
option(EMSCRIPTEN_SINGLE_HTML_FILE "Building with emscripten generates a single HTML file" OFF)
|
option(EMSCRIPTEN_SINGLE_HTML_FILE "Building with emscripten generates a single HTML file" OFF)
|
||||||
option(CONFIG_NEXT_TO_EXECUTABLE "Place configuration folder next to executable (portable executable)" OFF)
|
option(CONFIG_NEXT_TO_EXECUTABLE "Place configuration folder next to executable (portable executable)" OFF)
|
||||||
|
option(MACOS_MAKE_BUNDLE "Package the application as a bundle" ON)
|
||||||
|
|
||||||
# Setting sources
|
# Setting sources
|
||||||
set(sources "src/main.cpp"
|
set(sources "src/main.cpp"
|
||||||
|
|
@ -181,6 +182,8 @@ add_executable(infinipaint ${sources})
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(infinipaint PROPERTIES WIN32_EXECUTABLE TRUE)
|
set_target_properties(infinipaint PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
if(MACOS_MAKE_BUNDLE)
|
||||||
|
target_compile_definitions(infinipaint PRIVATE MACOS_MAKE_BUNDLE)
|
||||||
set_target_properties(infinipaint PROPERTIES MACOSX_BUNDLE TRUE)
|
set_target_properties(infinipaint PROPERTIES MACOSX_BUNDLE TRUE)
|
||||||
set_target_properties(infinipaint PROPERTIES
|
set_target_properties(infinipaint PROPERTIES
|
||||||
BUNDLE True
|
BUNDLE True
|
||||||
|
|
@ -201,6 +204,7 @@ elseif(APPLE)
|
||||||
"$<TARGET_FILE_DIR:infinipaint>/../Resources/appicon.icns"
|
"$<TARGET_FILE_DIR:infinipaint>/../Resources/appicon.icns"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ class ConanSkia(ConanFile):
|
||||||
self.tool_requires("ninja/[>=1.11.0]")
|
self.tool_requires("ninja/[>=1.11.0]")
|
||||||
|
|
||||||
if self.options.use_harfbuzz and self.options.use_system_harfbuzz and self.options.use_conan_harfbuzz:
|
if self.options.use_harfbuzz and self.options.use_system_harfbuzz and self.options.use_conan_harfbuzz:
|
||||||
self.requires("harfbuzz/10.4.0", options = {"with_subset":True, "with_glib":False})
|
self.requires("harfbuzz/11.4.1", options = {"with_subset":True, "with_glib":False})
|
||||||
|
|
||||||
if self.options.use_freetype and self.options.use_system_freetype and self.options.use_conan_freetype:
|
if self.options.use_freetype and self.options.use_system_freetype and self.options.use_conan_freetype:
|
||||||
self.requires("freetype/2.13.2")
|
self.requires("freetype/2.13.2")
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@ void switch_cwd() {
|
||||||
CFStringGetCString(str, path, 4096, kCFStringEncodingUTF8);
|
CFStringGetCString(str, path, 4096, kCFStringEncodingUTF8);
|
||||||
CFRelease(str);
|
CFRelease(str);
|
||||||
std::string newCWD(path);
|
std::string newCWD(path);
|
||||||
|
#ifdef MACOS_MAKE_BUNDLE
|
||||||
newCWD += "/Contents/Resources";
|
newCWD += "/Contents/Resources";
|
||||||
|
#endif
|
||||||
|
|
||||||
std::filesystem::current_path(std::filesystem::path(newCWD));
|
std::filesystem::current_path(std::filesystem::path(newCWD));
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue