356b124e2b
On Xcode, certain things don't work if the headers aren't also part of the project, namely .h/.cpp flipping ("Jump to Next Counterpart" in the navigation menu) and searching the entire workspace for symbols. The header files are now collected from the directory of the target and show up in the XCode project under "Header files" (per target). I limited this change to Mac since I cannot test anywhere else, but it would probably not hurt to do the same thing on other platforms. According to forums, the add_executable and add_library commands of CMake should just silently ignore these files, but add them to the generated target in the project.
49 lines
1.4 KiB
CMake
49 lines
1.4 KiB
CMake
#=============================================================================
|
|
# MusE
|
|
# Linux Music Editor
|
|
# $Id:$
|
|
#
|
|
# Copyright (C) 2002-2011 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}/build/gch.cmake)
|
|
|
|
include_directories(
|
|
${PROJECT_BINARY_DIR}
|
|
${PROJECT_SOURCE_DIR}
|
|
)
|
|
|
|
if (APPLE)
|
|
file(GLOB_RECURSE INCS "*.h")
|
|
else (APPLE)
|
|
set(INCS "")
|
|
endif (APPLE)
|
|
|
|
add_library (
|
|
msynth STATIC
|
|
${PROJECT_BINARY_DIR}/all.h
|
|
${PCH}
|
|
${INCS}
|
|
synti.cpp
|
|
)
|
|
|
|
set_target_properties (
|
|
msynth
|
|
PROPERTIES
|
|
COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -g -Wall -Wextra -Winvalid-pch"
|
|
)
|
|
|
|
ADD_DEPENDENCIES(msynth mops1)
|
|
ADD_DEPENDENCIES(msynth mops2)
|