more cmake cleanup to remove ROOT_DIR passing

This commit is contained in:
Stephen Birarda 2014-08-08 09:58:27 -07:00
parent 93b6f167f5
commit 1a71d655b9
6 changed files with 10 additions and 12 deletions

View file

@ -44,8 +44,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(HIFI_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries")
set(MACRO_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros")
# setup for find modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")

View file

@ -5,7 +5,10 @@ setup_hifi_project(${TARGET_NAME} TRUE)
include_glm(${TARGET_NAME})
# link in the shared libraries
link_hifi_libraries(${TARGET_NAME} audio avatars octree voxels fbx particles models metavoxels networking animation script-engine embedded-webserver)
link_hifi_libraries(${TARGET_NAME}
audio avatars octree voxels fbx particles models metavoxels
networking animation shared script-engine embedded-webserver
)
if (UNIX)
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES} ${CMAKE_DL_LIBS})

View file

@ -8,7 +8,7 @@
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(AUTO_MTC TARGET ROOT_DIR)
macro(AUTO_MTC TARGET)
set(AUTOMTC_SRC ${TARGET}_automtc.cpp)
file(GLOB INCLUDE_FILES src/*.h)

View file

@ -9,8 +9,8 @@
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(include_hifi_library_headers LIBRARY ROOT_DIR)
macro(include_hifi_library_headers LIBRARY)
include_directories("${ROOT_DIR}/libraries/${LIBRARY}/src")
include_directories("${HIFI_LIBRARY_DIR}/libraries/${LIBRARY}/src")
endmacro(include_hifi_library_headers _library _root_dir)

View file

@ -1,12 +1,6 @@
set(ROOT_DIR ..)
set(MACRO_DIR "${ROOT_DIR}/cmake/macros")
set(TARGET_NAME interface)
project(${TARGET_NAME})
# setup for find modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/")
# set a default root dir for each of our optional externals if it was not passed
set(OPTIONAL_EXTERNALS "faceplus" "faceshift" "oculus" "priovr" "sixense" "visage" "leapmotion" "rtmidi" "qxmpp")
foreach(EXTERNAL ${OPTIONAL_EXTERNALS})
@ -38,7 +32,6 @@ elseif (WIN32)
endif ()
# set up the external glm library
include("${MACRO_DIR}/IncludeGLM.cmake")
include_glm(${TARGET_NAME} "${ROOT_DIR}")
# create the InterfaceConfig.h file based on GL_HEADERS above

View file

@ -5,7 +5,7 @@ auto_mtc(${TARGET_NAME} "${ROOT_DIR}")
setup_hifi_library(${TARGET_NAME} "${AUTOMTC_SRC}")
# link in the networking library
link_hifi_libraries(${TARGET_NAME} networking)
link_hifi_libraries(${TARGET_NAME} shared networking)
include_glm(${TARGET_NAME} "${ROOT_DIR}")