Commit 85216863 authored by Admin's avatar Admin

MacOS build

parent 40664b90
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
# Build filesystem layout, according to LSB # Build filesystem layout, according to LSB
set(KUMIR2_EXEC_DIR "Kumir.app/Contents/MacOS") # executable binaries set(KUMIR2_EXEC_DIR "Kumir.app/Contents/MacOS") # executable binaries
set(KUMIR2_LIBS_DIR "Kumir.app/Contents/PlugIns") # shared libraries set(KUMIR2_LIBS_DIR "Kumir.app/Contents/MacOS") # shared libraries
set(KUMIR2_PLUGINS_DIR "Kumir.app/Contents/PlugIns") # libraries to be load at run time set(KUMIR2_PLUGINS_DIR "Kumir.app/Contents/PlugIns") # libraries to be load at run time
set(KUMIR2_RESOURCES_DIR "Kumir.app/Contents/Resources") # non-executable resources set(KUMIR2_RESOURCES_DIR "Kumir.app/Contents/Resources") # non-executable resources
set(KUMIR2_LIBEXECS_DIR "Kumir.app/Contents/MacOS") # executable supplementary binaries set(KUMIR2_LIBEXECS_DIR "Kumir.app/Contents/MacOS") # executable supplementary binaries
# clear default CMake RPATH values # clear default CMake RPATH values
set(CMAKE_SKIP_BUILD_RPATH FALSE) #set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) #set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_INSTALL_RPATH "") #set(CMAKE_INSTALL_RPATH "")
set(CMAKE_INSTALL_RPATH "${Qt5_DIR}/../../") #set(CMAKE_INSTALL_RPATH "${Qt5_DIR}/../../")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,'${Qt5_DIR}/../../'") #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,'${Qt5_DIR}/../../'")
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1") if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
...@@ -23,12 +23,12 @@ set(KUMIR2_SDK_SCRIPTS_DIR "${KUMIR2_RESOURCES_DIR}/devel") ...@@ -23,12 +23,12 @@ set(KUMIR2_SDK_SCRIPTS_DIR "${KUMIR2_RESOURCES_DIR}/devel")
set(KUMIR2_SDK_CMAKE_DIR "${KUMIR2_RESOURCES_DIR}/devel/cmake") set(KUMIR2_SDK_CMAKE_DIR "${KUMIR2_RESOURCES_DIR}/devel/cmake")
# Compile flags # Compile flags
set(KUMIR2_CXXFLAGS "-fno-exceptions -std=c++0x -fPIC -DAPPLE") set(KUMIR2_CXXFLAGS "-fno-exceptions -std=c++0x -fPIC -DAPPLE -Wno-inconsistent-missing-override")
set(KUMIR2_CXXFLAGS_Release "-O2 -DNDEBUG -DQT_NO_DEBUG") set(KUMIR2_CXXFLAGS_Release "-O2 -DNDEBUG -DQT_NO_DEBUG")
set(KUMIR2_CXXFLAGS_Debug "-g -O0 -Werror -Wreorder -Wreturn-type -Wno-error=unused-variable -Wno-error=unused-parameter") set(KUMIR2_CXXFLAGS_Debug "-g -O0 -Werror -Wreorder -Wreturn-type -Wno-error=unused-variable -Wno-error=unused-parameter")
# Linkage flags # Linkage flags
set(KUMIR2_LIBRARY_LINKER_FLAGS " -Wl,-rpath,'/'") #set(KUMIR2_LIBRARY_LINKER_FLAGS " -Wl,-rpath,'/'")
set(KUMIR2_PLUGIN_LINKER_FLAGS " -Wl,-rpath,'../PlugIns'") #set(KUMIR2_PLUGIN_LINKER_FLAGS " -Wl,-rpath,'../PlugIns'")
set(KUMIR2_LAUNCHER_LINKER_FLAGS "-Wl,-rpath,'../PlugIns'") #set(KUMIR2_LAUNCHER_LINKER_FLAGS "-Wl,-rpath,'../PlugIns'")
set(KUMIR2_TOOL_LINKER_FLAGS "-Wl,-rpath,'../PlugIns'") #set(KUMIR2_TOOL_LINKER_FLAGS "-Wl,-rpath,'../PlugIns'")
find_package(Kumir2 REQUIRED) find_package(Kumir2 REQUIRED)
# find_package(Llvm) # find_package(Llvm)
# Various GUI configurations if (NOT APPLE)
# Various GUI configurations
add_opt_subdirectory(kumir2-classic)
add_opt_subdirectory(kumir2-highgrade)
add_opt_subdirectory(kumir2-ide)
add_opt_subdirectory(kumir2-teacher)
else()
add_subdirectory(kumir2-macx)
endif(NOT APPLE)
add_opt_subdirectory(kumir2-classic)
add_opt_subdirectory(kumir2-highgrade)
add_opt_subdirectory(kumir2-ide)
add_opt_subdirectory(kumir2-teacher)
add_opt_subdirectory(kumir2-checkcourse) add_opt_subdirectory(kumir2-checkcourse)
add_opt_subdirectory(kumir2-bc) add_opt_subdirectory(kumir2-bc)
add_opt_subdirectory(kumir2-xrun) add_opt_subdirectory(kumir2-xrun)
......
...@@ -4,7 +4,8 @@ cmake_minimum_required(VERSION 3.0) ...@@ -4,7 +4,8 @@ cmake_minimum_required(VERSION 3.0)
find_package(Kumir2 REQUIRED) find_package(Kumir2 REQUIRED)
kumir2_add_launcher( kumir2_add_launcher(
NAME kumir2-teacher NAME Kumir
SPLASHSCREEN "coregui/splashscreens/professional.png" SPLASHSCREEN "splashscreen-macx.png"
WINDOW_ICON "window-icon-macx.png"
CONFIGURATION "CourseManager,Editor,Actor*,KumirAnalizer,KumirCodeGenerator,KumirCodeRun,!CoreGUI" CONFIGURATION "CourseManager,Editor,Actor*,KumirAnalizer,KumirCodeGenerator,KumirCodeRun,!CoreGUI"
) )
...@@ -627,7 +627,7 @@ QString Plugin::initialize(const QStringList &configurationArguments, ...@@ -627,7 +627,7 @@ QString Plugin::initialize(const QStringList &configurationArguments,
qDebug()<<"Stream status"<<resultStream.status(); qDebug()<<"Stream status"<<resultStream.status();
}else { }else {
resultStream.setStatus(QTextStream::WriteFailed); resultStream.setStatus(QTextStream::WriteFailed);
std::cout <<"Cant open output file:" << runtimeArguments.value('o').toString().toLocal8Bit().data()<<endl; // std::cout <<"Cant open output file:" << runtimeArguments.value('o').toString().toLocal8Bit().data()<<endl;
} }
} }
return ""; return "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment