split up bin and lib dirs from build dir

This commit is contained in:
Nick Bolton 2011-04-28 10:42:36 +00:00
parent 40b5a98790
commit 2155247425
5 changed files with 35 additions and 27 deletions

View File

@ -38,6 +38,10 @@ endif()
# First, declare project (important for prerequisite checks).
project(synergy C CXX)
# put binaries in a different dir to make them easier to find.
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# Set some easy to type variables.
set(root_dir ${CMAKE_SOURCE_DIR})
set(cmake_dir ${root_dir}/res)
@ -332,8 +336,10 @@ if (CONF_CPACK)
# files to exclude from src package (regex patterns)
# to escape, use 4 backslashes (\\\\) -- yuck!
set(CPACK_SOURCE_IGNORE_FILES
# temp output dir in root
# temp output dirs in root
"/build/"
"/bin/"
"/lib/"
# generated config.h file
"/config\\\\.h$"
@ -372,4 +378,4 @@ if (CONF_DOXYGEN)
# For doxygen.cfg, save the results based on a template (doxygen.cfg.in).
configure_file(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg)
endif()
endif()

4
hm.py
View File

@ -32,7 +32,9 @@
import sys, os
sys.path.append('tools')
if os.path.exists('build'):
# if old build src dir exists, move it, as this will now be used for build
# output.
if os.path.exists('build/toolchain.py'):
print "Removing legacy build dir."
os.rename('build', 'build.old')

View File

@ -41,21 +41,21 @@ elseif (UNIX)
endif()
set(inc
../lib/arch
../lib/base
../lib/client
../lib/common
../lib/io
../lib/mt
../lib/net
../lib/platform
../lib/synergy
../../tools/gtest/include
../../lib/arch
../../lib/base
../../lib/client
../../lib/common
../../lib/io
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../../../tools/gtest/include
)
if (UNIX)
list(APPEND inc
../..
../../..
)
endif()

View File

@ -14,26 +14,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set(src
../../tools/gtest/src/gtest_main.cc
../../../../tools/gtest/src/gtest_main.cc
synergy/CClipboardTests.cpp
)
set(inc
../lib/arch
../lib/base
../lib/client
../lib/common
../lib/io
../lib/mt
../lib/net
../lib/platform
../lib/synergy
../../tools/gtest/include
../../lib/arch
../../lib/base
../../lib/client
../../lib/common
../../lib/io
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../../../tools/gtest/include
)
if (UNIX)
list(APPEND inc
../..
../../..
)
endif()

View File

@ -36,7 +36,7 @@ class InternalCommands:
source_dir = '..' # Source, relative to build.
cmake_dir = 'res'
_bin_dir = 'bin'
_bin_dir = 'build'
gui_dir = 'src/gui'
doc_dir = 'doc'