summaryrefslogtreecommitdiff
path: root/muse2/muse/remote
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-20 04:54:36 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-20 04:54:36 +0000
commit673172e3ffb8e345b2bbfb6596ac3d79a1e17f14 (patch)
treed6535f36f0ff55b0f313d5e0aac8823c3fd98161 /muse2/muse/remote
parentda484f0563218c2432ee4d6f2eb3ce8c7c298622 (diff)
Major cmake cleanup. Please see the ChangeLog.
Diffstat (limited to 'muse2/muse/remote')
-rw-r--r--muse2/muse/remote/CMakeLists.txt61
-rw-r--r--muse2/muse/remote/pyapi.cpp2
2 files changed, 48 insertions, 15 deletions
diff --git a/muse2/muse/remote/CMakeLists.txt b/muse2/muse/remote/CMakeLists.txt
index 01605975..87ad9672 100644
--- a/muse2/muse/remote/CMakeLists.txt
+++ b/muse2/muse/remote/CMakeLists.txt
@@ -1,25 +1,58 @@
+#=============================================================================
+# MusE
+# Linux Music Editor
+# $Id:$
#
+# Copyright (C) 2002-2006 by Werner Schweer and others
#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2.
#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#=============================================================================
-include(${PROJECT_SOURCE_DIR}/pch.txt)
-
-file (GLOB remote_src
- pyapi.cpp
- )
+##
+## List of source files to compile
+##
+file (GLOB remote_source_files
+ pyapi.cpp
+ )
+##
+## Define target
+##
add_library(remote SHARED
- ${remote_src}
- ${PROJECT_BINARY_DIR}/all.h.pch
- )
-
-set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${remote_src} CACHE INTERNAL "")
+ ${remote_source_files}
+ ${PROJECT_BINARY_DIR}/all.h.pch
+ )
-install(TARGETS remote DESTINATION ${MUSE_MODULES_DIR})
+##
+## Append to the list of translations
+##
+set (FILES_TO_TRANSLATE
+ ${FILES_TO_TRANSLATE}
+ ${remote_source_files}
+ CACHE INTERNAL ""
+ )
+##
+## Compilation flags and target name
+##
set_source_files_properties(
- pyapi.cpp
- PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h -include ${PYTHON_INCLUDES} -DENABLE_PYTHON"
- )
+ pyapi.cpp
+ PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h -include ${PYTHON_INCLUDES} -DENABLE_PYTHON"
+ )
+##
+## Install location
+##
+install(TARGETS remote
+ DESTINATION ${MusE_MODULES_DIR}
+ )
diff --git a/muse2/muse/remote/pyapi.cpp b/muse2/muse/remote/pyapi.cpp
index ee64226a..84543b18 100644
--- a/muse2/muse/remote/pyapi.cpp
+++ b/muse2/muse/remote/pyapi.cpp
@@ -980,7 +980,7 @@ static void* pyapithreadfunc(void*)
PyObject *pMainModule = PyImport_AddModule( "__main__" );
PyObject *pMainDictionary = PyModule_GetDict( pMainModule );
- string launcherfilename = string(INSTPREFIX) + string("/share/muse/pybridge/museplauncher.py");
+ string launcherfilename = string(SHAREDIR) + string("/pybridge/museplauncher.py");
printf("Initiating MusE Pybridge launcher from %s\n", launcherfilename.c_str());
FILE* fp = fopen(launcherfilename.c_str(),"r");
PyRun_File(fp, launcherfilename.c_str(), Py_file_input, pMainDictionary, pMainDictionary);