mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-31 13:55:10 +00:00
Fix cmake build
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -103,6 +103,8 @@ megacmdconfig.h.in
|
||||
/build/megacmd/megacmd.dsc
|
||||
/build/megacmd/megacmd.spec
|
||||
/build/megacmd/megacmd_*.tar.gz
|
||||
/build/build-cmake-*
|
||||
/build/cmake/CMakeLists.txt.user
|
||||
contrib/QtCreator/MEGAcmd/MEGAcmdServer/Makefile.Debug
|
||||
contrib/QtCreator/MEGAcmd/.qmake.stash
|
||||
contrib/QtCreator/MEGAcmd/MEGAcmdClient/Makefile.Debug
|
||||
|
@@ -25,6 +25,7 @@ add_executable(mega-cmd-server
|
||||
"${ProjectDir}/src/megacmdutils.cpp"
|
||||
"${ProjectDir}/src/megacmdcommonutils.cpp"
|
||||
"${ProjectDir}/src/comunicationsmanager.cpp"
|
||||
"${ProjectDir}/src/comunicationsmanagerfilesockets.cpp"
|
||||
"${ProjectDir}/src/comunicationsmanagernamedpipes.cpp"
|
||||
"${ProjectDir}/src/comunicationsmanagerportsockets.cpp"
|
||||
"${ProjectDir}/src/configurationmanager.cpp"
|
||||
@@ -43,14 +44,15 @@ add_executable(mega-cmd
|
||||
"${ProjectDir}/src/megacmdshell/megacmdshellcommunicationsnamedpipes.cpp"
|
||||
"${ProjectDir}/src/megacmdshell/megacmdshell.cpp"
|
||||
"${ProjectDir}/src/megacmdcommonutils.cpp"
|
||||
|
||||
)
|
||||
|
||||
target_link_libraries(mega-exec Mega )
|
||||
target_link_libraries(mega-cmd Mega )
|
||||
target_link_libraries(mega-cmd-server Mega Lz32.lib)
|
||||
target_link_libraries(mega-exec Mega)
|
||||
target_link_libraries(mega-cmd Mega)
|
||||
if (WIN32)
|
||||
target_link_libraries(mega-cmd-server Mega Lz32.lib)
|
||||
else()
|
||||
target_link_libraries(mega-cmd-server Mega)
|
||||
endif()
|
||||
if (NOT NO_READLINE)
|
||||
target_link_libraries(mega-cmd readline)
|
||||
endif (NOT NO_READLINE)
|
||||
|
||||
|
||||
|
@@ -358,6 +358,7 @@ SOCKET MegaCmdShellCommunications::createSocket(int number, bool initializeserve
|
||||
#else
|
||||
const char executable[] = "../MEGAcmdServer/MEGAcmd";
|
||||
#endif
|
||||
const char executable2[] = "./mega-cmd-server";
|
||||
|
||||
#else
|
||||
#ifdef __MACH__
|
||||
@@ -380,14 +381,12 @@ SOCKET MegaCmdShellCommunications::createSocket(int number, bool initializeserve
|
||||
if (ret && errno == 2 )
|
||||
{
|
||||
cerr << "Couln't initiate MEGAcmd server: executable not found: " << executable << endl;
|
||||
#ifdef NDEBUG
|
||||
cerr << "Trying to use alternative executable: " << executable2 << endl;
|
||||
ret = execvp(executable2,args);
|
||||
if (ret && errno == 2 )
|
||||
{
|
||||
cerr << "Couln't initiate MEGAcmd server: executable not found: " << executable2 << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ret && errno !=2 )
|
||||
|
Reference in New Issue
Block a user