From 673172e3ffb8e345b2bbfb6596ac3d79a1e17f14 Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Mon, 20 Dec 2010 04:54:36 +0000 Subject: Major cmake cleanup. Please see the ChangeLog. --- muse2/al/CMakeLists.txt | 81 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 21 deletions(-) (limited to 'muse2/al') diff --git a/muse2/al/CMakeLists.txt b/muse2/al/CMakeLists.txt index 6e2881b8..a0031143 100644 --- a/muse2/al/CMakeLists.txt +++ b/muse2/al/CMakeLists.txt @@ -1,40 +1,79 @@ +#============================================================================= +# 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) -set (al_src - al.cpp sig.cpp xml.cpp dsp.cpp - ) - +## +## List of source files to compile +## +file (GLOB al_source_files + al.cpp + dsp.cpp + sig.cpp + xml.cpp + ) if (USE_SSE) - set(al_src ${al_src} dspSSE.cpp dspXMM.cpp) + file (GLOB al_source_files + ${al_source_files} + dspSSE.cpp + dspXMM.cpp + ) endif (USE_SSE) +## +## Define target +## add_library(al SHARED - ${al_src} - ${PROJECT_BINARY_DIR}/all.h.pch - ) - -install(TARGETS al DESTINATION ${MUSE_MODULES_DIR}) - -target_link_libraries ( al - ${QT_LIBRARIES} + ${PROJECT_BINARY_DIR}/all.h.pch + ${al_source_files} ) +## +## Compilation flags and target name +## set_target_properties( al PROPERTIES OUTPUT_NAME muse_al ) - set_source_files_properties( - al.cpp sig.cpp xml.cpp dsp.cpp - dspXMM.cpp - PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h" - ) + al.cpp + dsp.cpp + dspXMM.cpp + sig.cpp + xml.cpp + PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h" + ) +set_source_files_properties( + dspSSE.cpp + PROPERTIES COMPILE_FLAGS "-x assembler" + ) -set_source_files_properties( dspSSE.cpp - PROPERTIES COMPILE_FLAGS "-x assembler" - ) +## +## Linkage +## +target_link_libraries ( al + ${QT_LIBRARIES} + ) +## +## Install location +## +install(TARGETS al + DESTINATION ${MusE_MODULES_DIR} + ) -- cgit v1.2.3