Commit 0a3e0e3a authored by jcfr's avatar jcfr
Browse files

STYLE: Fix indent, add comment in CMakeLists.txt and Slicer Build macros

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16360 3bd1e089-480b-0410-8dfb-8563597acbee
parent 4236ebd3
PROJECT(Applications)
IF(Slicer_BUILD_CLI)
ADD_SUBDIRECTORY(CLI)
ENDIF(Slicer_BUILD_CLI)
ENDIF()
ADD_SUBDIRECTORY(SlicerQT)
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(Testing)
ENDIF(BUILD_TESTING)
ENDIF()
......@@ -33,22 +33,27 @@ ENDFOREACH()
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
SET(include_dirs
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${ModuleDescriptionParser_BINARY_DIR}
${ModuleDescriptionParser_SOURCE_DIR}
)
INCLUDE_DIRECTORIES(${include_dirs})
# --------------------------------------------------------------------------
# Update Slicer_Base_INCLUDE_DIRS
# --------------------------------------------------------------------------
SET(Slicer_Base_INCLUDE_DIRS ${Slicer_Base_INCLUDE_DIRS} ${include_dirs} CACHE INTERNAL "Slicer Base includes" FORCE)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/vtkSlicerBaseCLIConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseCLIConfigure.h
# --------------------------------------------------------------------------
# Configure headers
# --------------------------------------------------------------------------
set(configure_header_file vtkSlicerBaseCLIConfigure.h)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/${configure_header_file}.in
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
INSTALL(FILES
......@@ -62,7 +67,7 @@ INSTALL(FILES
# --------------------------------------------------------------------------
# Sources
# --------------------------------------------------------------------------
# Single library target. Down the road, we may want to have one library that
# only depends on ITK and a second library that only depends on VTK
......@@ -71,27 +76,30 @@ SET(SlicerBaseCLI_SRCS
)
# --------------------------------------------------------------------------
# Build and install the library
# Build library
# --------------------------------------------------------------------------
SET(lib_name "SlicerBaseCLI")
ADD_LIBRARY(${lib_name}
${SlicerBaseCLI_SRCS}
)
ADD_LIBRARY(${lib_name} ${SlicerBaseCLI_SRCS})
TARGET_LINK_LIBRARIES(${lib_name}
vtkCommon
ModuleDescriptionParser
)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES LABELS ${lib_name})
# Update Slicer_Base_LIBRARIES
SET(Slicer_Base_LIBRARIES ${Slicer_Base_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Base libraries" FORCE)
# Apply user-defined properties to the library target.
IF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF(Slicer_LIBRARY_PROPERTIES)
ENDIF()
# --------------------------------------------------------------------------
# Update Slicer_Base_LIBRARIES
# --------------------------------------------------------------------------
SET(Slicer_Base_LIBRARIES ${Slicer_Base_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Base libraries" FORCE)
# --------------------------------------------------------------------------
# Build library
# --------------------------------------------------------------------------
INSTALL(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......
......@@ -32,6 +32,7 @@ ENDFOREACH()
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
set(include_dirs
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
......@@ -62,12 +63,18 @@ ENDIF()
include_directories(${include_dirs})
# --------------------------------------------------------------------------
# Update Slicer_Base_INCLUDE_DIRS
# --------------------------------------------------------------------------
SET(Slicer_Base_INCLUDE_DIRS ${Slicer_Base_INCLUDE_DIRS} ${include_dirs} CACHE INTERNAL "Slicer Base includes" FORCE)
# --------------------------------------------------------------------------
# Configure headers
# --------------------------------------------------------------------------
set(configure_header_file vtkSlicerBaseLogicConfigure.h)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkSlicerBaseLogicConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkSlicerBaseLogicConfigure.h
${CMAKE_CURRENT_SOURCE_DIR}/${configure_header_file}.in
${CMAKE_CURRENT_BINARY_DIR}/${configure_header_file}
)
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
......@@ -79,7 +86,7 @@ install(FILES
# --------------------------------------------------------------------------
# Sources
# --------------------------------------------------------------------------
set(SlicerBaseLogic_SRCS
# Logic classes (data management and calculation)
vtkSlicerApplicationLogic.cxx
......@@ -131,8 +138,8 @@ SET_SOURCE_FILES_PROPERTIES(
# "vtkSlicerBaseLogic.h")
# --------------------------------------------------------------------------
# Build the library
# Build library
# --------------------------------------------------------------------------
set(lib_name SlicerBaseLogic)
#SET(srcs ${SlicerBaseLogic_SRCS} ${Instantiator_SRCS})
......@@ -162,16 +169,19 @@ ENDIF()
TARGET_LINK_LIBRARIES(${lib_name} ${libs})
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES LABELS ${lib_name})
# Update Slicer_Base_LIBRARIES
SET(Slicer_Base_LIBRARIES ${Slicer_Base_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Base libraries" FORCE)
# Apply user-defined properties to the library target.
IF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer_LIBRARY_PROPERTIES}
)
ENDIF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF()
# --------------------------------------------------------------------------
# Update Slicer_Base_LIBRARIES
# --------------------------------------------------------------------------
SET(Slicer_Base_LIBRARIES ${Slicer_Base_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Base libraries" FORCE)
# --------------------------------------------------------------------------
# Install library
# --------------------------------------------------------------------------
install(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......@@ -179,11 +189,9 @@ install(TARGETS ${lib_name}
)
# --------------------------------------------------------------------------
# Create Python wrappers if VTK is wrapped in Python
#
# Python Wrapping
# --------------------------------------------------------------------------
IF(VTK_WRAP_PYTHON)
vtkMacroKitPythonWrap(
KIT_NAME ${lib_name}
KIT_SRCS ${SlicerBaseLogic_SRCS}
......@@ -191,18 +199,18 @@ IF(VTK_WRAP_PYTHON)
KIT_INSTALL_BIN_DIR ${Slicer_INSTALL_BIN_DIR}
KIT_INSTALL_LIB_DIR ${Slicer_INSTALL_LIB_DIR}
)
ENDIF()
# --------------------------------------------------------------------------
# Testing (requires some of the examples)
# --------------------------------------------------------------------------
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(Testing)
ENDIF(BUILD_TESTING)
ENDIF()
# --------------------------------------------------------------------------
# Install support files
# --------------------------------------------------------------------------
# Should this location change, update Base/Logic/vtkSlicerColorLogic.cxx
......@@ -214,7 +222,7 @@ foreach(colorfile ${COLORFILES})
${CMAKE_BINARY_DIR}/${Slicer_INSTALL_SHARE_DIR}/${PROJECT_NAME}/${colorfile}
COPYONLY
)
endforeach(colorfile)
endforeach()
install(
FILES ${COLORFILES}
DESTINATION ${Slicer_INSTALL_SHARE_DIR}/${PROJECT_NAME}/Resources/ColorFiles
......
......@@ -59,21 +59,28 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
${ARGN}
)
# --------------------------------------------------------------------------
# Sanity checks
IF(NOT DEFINED SLICERQTBASELIB_NAME)
MESSAGE(SEND_ERROR "NAME is mandatory")
ENDIF()
# --------------------------------------------------------------------------
SET(expected_defined_vars NAME EXPORT_DIRECTIVE)
FOREACH(var ${expected_defined_vars})
IF(NOT DEFINED SLICERQTBASELIB_${var})
MESSAGE(FATAL_ERROR "${var} is mandatory")
ENDIF()
ENDFOREACH()
IF(NOT DEFINED SLICERQTBASELIB_EXPORT_DIRECTIVE)
MESSAGE(SEND_ERROR "EXPORT_DIRECTIVE is mandatory")
IF(NOT DEFINED Slicer_INSTALL_NO_DEVELOPMENT)
MESSAGE(SEND_ERROR "Slicer_INSTALL_NO_DEVELOPMENT is mandatory")
ENDIF()
# --------------------------------------------------------------------------
# Define library name
# --------------------------------------------------------------------------
SET(lib_name ${SLICERQTBASELIB_NAME})
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
SET(QT_INCLUDE_DIRS
${QT_INCLUDE_DIR}
${QT_QTWEBKIT_INCLUDE_DIR}
......@@ -97,12 +104,14 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
INCLUDE_DIRECTORIES(${include_dirs})
#-----------------------------------------------------------------------------
# Update Slicer_Base_INCLUDE_DIRS
#-----------------------------------------------------------------------------
SET(Slicer_Base_INCLUDE_DIRS ${Slicer_Base_INCLUDE_DIRS} ${include_dirs} CACHE INTERNAL "Slicer Base includes" FORCE)
#-----------------------------------------------------------------------------
# Configure
#
# --------------------------------------------------------------------------
SET(MY_LIBRARY_EXPORT_DIRECTIVE ${SLICERQTBASELIB_EXPORT_DIRECTIVE})
SET(MY_EXPORT_HEADER_PREFIX ${SLICERQTBASELIB_NAME})
SET(MY_LIBNAME ${lib_name})
......@@ -116,8 +125,7 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
#-----------------------------------------------------------------------------
# Sources
#
# --------------------------------------------------------------------------
QT4_WRAP_CPP(SLICERQTBASELIB_MOC_OUTPUT ${SLICERQTBASELIB_MOC_SRCS})
QT4_WRAP_UI(SLICERQTBASELIB_UI_CXX ${SLICERQTBASELIB_UI_SRCS})
IF(DEFINED SLICERQTBASELIB_RESOURCES)
......@@ -132,7 +140,10 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
${SLICERQTBASELIB_QRC_SRCS}
WRAP_EXCLUDE
)
# --------------------------------------------------------------------------
# Source groups
# --------------------------------------------------------------------------
SOURCE_GROUP("Resources" FILES
${SLICERQTBASELIB_UI_SRCS}
${Slicer_SOURCE_DIR}/Resources/qSlicerLogos.qrc
......@@ -147,11 +158,13 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
)
# --------------------------------------------------------------------------
# Build the library
# Update Slicer_Base_LIBRARIES
# --------------------------------------------------------------------------
SET(Slicer_Base_LIBRARIES ${Slicer_Base_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Base libraries" FORCE)
# --------------------------------------------------------------------------
# Build the library
# --------------------------------------------------------------------------
ADD_LIBRARY(${lib_name}
${SLICERQTBASELIB_SRCS}
${SLICERQTBASELIB_MOC_OUTPUT}
......@@ -163,7 +176,7 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
# Apply user-defined properties to the library target.
IF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF(Slicer_LIBRARY_PROPERTIES)
ENDIF()
SET(QT_LIBRARIES
${QT_QTCORE_LIBRARY}
......@@ -177,7 +190,9 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
${SLICERQTBASELIB_TARGET_LIBRARIES}
)
# Install rules
#-----------------------------------------------------------------------------
# Install library
#-----------------------------------------------------------------------------
INSTALL(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......@@ -192,7 +207,9 @@ MACRO(SlicerMacroBuildBaseQtLibrary)
DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME} COMPONENT Development
)
# --------------------------------------------------------------------------
# PythonQt wrapping
# --------------------------------------------------------------------------
IF(Slicer_USE_PYTHONQT AND SLICERQTBASELIB_WRAP_PYTHONQT)
SET(KIT_PYTHONQT_SRCS) # Clear variable
ctkMacroWrapPythonQt("org.slicer.base" ${lib_name}
......
......@@ -11,7 +11,9 @@ MACRO(slicerMacroBuildCLI)
${ARGN}
)
# --------------------------------------------------------------------------
# Sanity checks
# --------------------------------------------------------------------------
IF(NOT DEFINED MY_NAME)
MESSAGE(SEND_ERROR "NAME is mandatory")
ENDIF()
......
......@@ -29,21 +29,24 @@ MACRO(SlicerMacroBuildModuleLogic)
${ARGN}
)
# --------------------------------------------------------------------------
# Sanity checks
IF(NOT DEFINED MODULELOGIC_NAME)
MESSAGE(SEND_ERROR "NAME is mandatory")
ENDIF()
IF(NOT DEFINED MODULELOGIC_EXPORT_DIRECTIVE)
MESSAGE(SEND_ERROR "EXPORT_DIRECTIVE is mandatory")
ENDIF()
# --------------------------------------------------------------------------
SET(expected_defined_vars NAME EXPORT_DIRECTIVE)
FOREACH(var ${expected_defined_vars})
IF(NOT DEFINED MODULELOGIC_${var})
MESSAGE(FATAL_ERROR "${var} is mandatory")
ENDIF()
ENDFOREACH()
# --------------------------------------------------------------------------
# Define library name
# --------------------------------------------------------------------------
SET(lib_name ${MODULELOGIC_NAME})
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
......@@ -69,15 +72,15 @@ MACRO(SlicerMacroBuildModuleLogic)
"${dynamicHeaders};${CMAKE_CURRENT_BINARY_DIR}/${MY_EXPORT_HEADER_PREFIX}Export.h")
#-----------------------------------------------------------------------------
# Source group(s)
# Source groups
# --------------------------------------------------------------------------
SOURCE_GROUP("Generated" FILES
${dynamicHeaders}
)
# --------------------------------------------------------------------------
# Build the library
# Build library
# --------------------------------------------------------------------------
ADD_LIBRARY(${lib_name}
${MODULELOGIC_SRCS}
)
......@@ -113,12 +116,12 @@ MACRO(SlicerMacroBuildModuleLogic)
# Apply user-defined properties to the library target.
IF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer_LIBRARY_PROPERTIES}
)
ENDIF(Slicer_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF()
# Install rules
# --------------------------------------------------------------------------
# Install library
# --------------------------------------------------------------------------
INSTALL(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT RuntimeLibraries
......
......@@ -29,29 +29,34 @@ MACRO(slicerMacroBuildQtModule)
""
${ARGN}
)
# --------------------------------------------------------------------------
# Sanity checks
IF(NOT DEFINED QTMODULE_NAME)
MESSAGE(SEND_ERROR "NAME is mandatory")
ENDIF()
IF(NOT DEFINED QTMODULE_EXPORT_DIRECTIVE)
MESSAGE(SEND_ERROR "EXPORT_DIRECTIVE is mandatory")
ENDIF()
# --------------------------------------------------------------------------
SET(expected_defined_vars NAME EXPORT_DIRECTIVE)
FOREACH(var ${expected_defined_vars})
IF(NOT DEFINED QTMODULE_${var})
MESSAGE(FATAL_ERROR "${var} is mandatory")
ENDIF()
ENDFOREACH()
IF(NOT DEFINED QTMODULE_TITLE)
SET(QTMODULE_TITLE ${QTMODULE_NAME})
ENDIF()
# --------------------------------------------------------------------------
# Define library name
# --------------------------------------------------------------------------
SET(lib_name qSlicer${QTMODULE_NAME}Module)
# --------------------------------------------------------------------------
# Define Module title
# --------------------------------------------------------------------------
ADD_DEFINITIONS(-DQTMODULE_TITLE="${QTMODULE_TITLE}")
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
......@@ -76,17 +81,9 @@ MACRO(slicerMacroBuildQtModule)
SET(dynamicHeaders
"${dynamicHeaders};${CMAKE_CURRENT_BINARY_DIR}/${MY_EXPORT_HEADER_PREFIX}Export.h")
#file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/Resources/*.h")
#install(FILES
# ${files}
# DESTINATION ${Slicer_INSTALL_INCLUDE_DIR}/${PROJECT_NAME}/Resources COMPONENT Development
# )
#-----------------------------------------------------------------------------
# Sources
#
#-----------------------------------------------------------------------------
QT4_WRAP_CPP(QTMODULE_MOC_OUTPUT ${QTMODULE_MOC_SRCS})
QT4_WRAP_UI(QTMODULE_UI_CXX ${QTMODULE_UI_SRCS})
IF(DEFINED QTMODULE_RESOURCES)
......@@ -104,6 +101,9 @@ MACRO(slicerMacroBuildQtModule)
WRAP_EXCLUDE
)
# --------------------------------------------------------------------------
# Source groups
# --------------------------------------------------------------------------
SOURCE_GROUP("Resources" FILES
${QTMODULE_UI_SRCS}
${Slicer_LOGOS_RESOURCE}
......@@ -118,14 +118,13 @@ MACRO(slicerMacroBuildQtModule)
)
# --------------------------------------------------------------------------
# Build the library
# Build library
#-----------------------------------------------------------------------------
ADD_LIBRARY(${lib_name}
${QTMODULE_SRCS}
${QTMODULE_MOC_OUTPUT}
${QTMODULE_UI_CXX}
${QTMODULE_QRC_SRCS}
#${qSlicerModule_TCL_SRCS}
)
# Set qt loadable modules output path
......@@ -140,7 +139,6 @@ MACRO(slicerMacroBuildQtModule)
${Slicer_Libs_LIBRARIES}
${Slicer_Base_LIBRARIES}
${QTMODULE_TARGET_LIBRARIES}
#${ITK_LIBRARIES}
)
# Apply user-defined properties to the library target.
......@@ -148,7 +146,9 @@ MACRO(slicerMacroBuildQtModule)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF()
# Install rules
# --------------------------------------------------------------------------
# Install library
# --------------------------------------------------------------------------
INSTALL(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR} COMPONENT RuntimeLibraries
......
PROJECT(SlicerLibs)
#
# Order of project directory is important. Project should be topologically ordered
#
# --------------------------------------------------------------------------
# ----] W A R N I N G [----
# --------------------------------------------------------------------------
# Order of project directory matters. Project should be topologically ordered
# --------------------------------------------------------------------------
SET(dirs
SlicerExecutionModel # Bundled subdirectory that can easily be included in other packages.
......@@ -46,7 +49,6 @@ ENDIF()
#-----------------------------------------------------------------------------
# Set library properties
#-----------------------------------------------------------------------------
SET(ModuleDescriptionParser_USE_PYTHON ${Slicer_USE_PYTHONQT})
SET(IGT_USE_IGSTK ${Slicer_USE_IGSTK})
......@@ -59,7 +61,6 @@ SET(MRML_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/MRML/Testing/TestData)
#-----------------------------------------------------------------------------
# Generate list of corresponding libraries and include directories
#-----------------------------------------------------------------------------
SET(libs)
SET(include_dirs)
FOREACH(dir ${dirs})
......@@ -80,14 +81,12 @@ LIST(REMOVE_ITEM libs SlicerExecutionModel) # Not a library
#-----------------------------------------------------------------------------
# Update variable Slicer_Libs_LIBRARIES and Slicer_Libs_INCLUDE_DIRS
#-----------------------------------------------------------------------------
SET(Slicer_Libs_LIBRARIES ${Slicer_Libs_LIBRARIES} ${libs} CACHE INTERNAL "Slicer Libs libraries" FORCE)
SET(Slicer_Libs_INCLUDE_DIRS ${Slicer_Libs_INCLUDE_DIRS} ${include_dirs} CACHE INTERNAL "Slicer Libs includes" FORCE)
#-----------------------------------------------------------------------------
# Loop over list of directories
#-----------------------------------------------------------------------------
FOREACH(dir ${dirs})
SET(${dir}_INSTALL_BIN_DIR ${Slicer_INSTALL_LIB_DIR})
SET(${dir}_INSTALL_LIB_DIR ${Slicer_INSTALL_LIB_DIR})
......
......@@ -121,15 +121,15 @@ TARGET_LINK_LIBRARIES(CudaSupport
# --------------------------------------------------------------------------
# Testing (requires some of the examples)
# --------------------------------------------------------------------------
#IF(BUILD_TESTING)
# ADD_SUBDIRECTORY(Testing)
#ENDIF(BUILD_TESTING)
#ENDIF()
CONFIGURE_FILE(
${CudaSupport_SOURCE_DIR}/CudappSupportConfigure.h.in
${CudaSupport_BINARY_DIR}/CudappSupportConfigure.h
)
)
ENDIF(CUDA_SUPPORT_ENABLED)
ENDIF()
......@@ -4,14 +4,13 @@ project(FileWatcher)
cmake_minimum_required(VERSION 2.8.2)
#-----------------------------------------------------------------------------
if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
endif(NOT DEFINED BUILD_SHARED_LIBS)
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}
......@@ -24,7 +23,7 @@ configure_file(
# --------------------------------------------------------------------------
# Sources
# --------------------------------------------------------------------------
set(FileWatcher_SRCS
FileWatcher.cpp
FileWatcherLinux.cpp
......@@ -33,41 +32,38 @@ set(FileWatcher_SRCS
)
# --------------------------------------------------------------------------
# Build and install the library
# Build library
# --------------------------------------------------------------------------
set(lib_name FileWatcher)
add_library(${lib_name}
${FileWatcher_SRCS}
)
add_library(${lib_name} ${FileWatcher_SRCS})
set(link_libs
)
set(libs)
if(NOT WIN32 AND NOT APPLE AND NOT UNIX)
set(link_libs ${link_libs})