use build directory to keep cmake clean

This commit is contained in:
Stephen Birarda 2013-02-07 11:57:35 -08:00
parent 4860fb086d
commit 0ad551c86d
4 changed files with 15 additions and 54 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@ CMakeCache.txt
CMakeFiles/
CMakeScripts/
cmake_install.cmake
build/
# Xcode
*.xcodeproj

View file

@ -1,8 +1,10 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin/")
project (hifi)
project(hifi)
set (GLM_ROOT_DIR "${CMAKE_SOURCE_DIR}/thirdparty")
set(GLM_ROOT_DIR "${CMAKE_SOURCE_DIR}/thirdparty")
add_subdirectory (interface)
add_subdirectory(interface)

View file

@ -1,10 +1,11 @@
cmake_minimum_required (VERSION 2.8)
project (interface)
cmake_minimum_required(VERSION 2.8)
file (GLOB INTERFACE_SRCS src/*.cpp src/*.h)
project(interface)
add_executable (interface ${INTERFACE_SRCS})
file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
find_package (GLM REQUIRED)
include_directories (${GLM_INCLUDE_DIRS})
target_link_libraries (interface GLM)
add_executable(interface ${INTERFACE_SRCS})
find_package(GLM REQUIRED)
include_directories(${GLM_INCLUDE_DIRS})
target_link_libraries(interface GLM)

View file

@ -1,43 +0,0 @@
set(NAME glm)
file(GLOB ROOT_SOURCE *.cpp)
file(GLOB ROOT_INLINE *.inl)
file(GLOB ROOT_HEADER *.hpp)
file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp)
file(GLOB_RECURSE CORE_INLINE ./core/*.inl)
file(GLOB_RECURSE CORE_HEADER ./core/*.hpp)
file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp)
file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl)
file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp)
source_group("Core Files" FILES ${CORE_SOURCE})
source_group("Core Files" FILES ${CORE_INLINE})
source_group("Core Files" FILES ${CORE_HEADER})
source_group("GTC Files" FILES ${GTC_SOURCE})
source_group("GTC Files" FILES ${GTC_INLINE})
source_group("GTC Files" FILES ${GTC_HEADER})
source_group("GTX Files" FILES ${GTX_SOURCE})
source_group("GTX Files" FILES ${GTX_INLINE})
source_group("GTX Files" FILES ${GTX_HEADER})
source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE})
source_group("VIRTREV Files" FILES ${VIRTREV_INLINE})
source_group("VIRTREV Files" FILES ${VIRTREV_HEADER})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
add_executable(${NAME}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER})