wiesel / build / build.cmake

# main build script for all wiesel projects


# ensure a correct version of cmake is installed
cmake_minimum_required(VERSION 2.8)


# compatibility
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required


# check if WIESEL_DIR is set and exists
if(NOT WIESEL_DIR)
	message(FATAL_ERROR "variable WIESEL_DIR missing")
endif()

# Add module path
set(
	CMAKE_MODULE_PATH
	${CMAKE_MODULE_PATH}
	"${WIESEL_DIR}/build/cmake/modules"
)

# paths
set(WIESEL_SRC_DIR       ${WIESEL_DIR}/src)
set(WIESEL_TESTS_DIR     ${WIESEL_DIR}/tests)
set(WIESEL_MODULES_DIR   ${WIESEL_DIR}/libraries/desktop)

# load standard modules
include(wiesel-module)
include(wiesel-testsuite)


# load optional config includes
include(config/local/paths.cmake OPTIONAL)



# enable warnings?
option(WIESEL_BUILD_WARN_ALL "Enable all warnings on build. (gcc option -Wall)" ON)
if (WIESEL_BUILD_WARN_ALL)
	set(CMAKE_CXX_FLAGS "-g -Wall")
	set(CMAKE_C_FLAGS "-g -Wall")
endif(WIESEL_BUILD_WARN_ALL)




# on win32 we may need to copy all SDL DLL's to our binary directory
if (WIN32)
	if (DEFINED EXTRALIBS_PATH)
		file(GLOB DLLS_TO_COPY ${EXTRALIBS_PATH}/bin/*.dll)
		file(COPY ${DLLS_TO_COPY} DESTINATION .)
	endif()
endif()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.