Fix setting VERSION variable when doxygen is switched off.
[libftdi] / CMakeLists.txt
index 339fc54..75c69e8 100644 (file)
@@ -1,9 +1,12 @@
 # Project
 project(libftdi)
+set(PACKAGE libftdi)
 set(MAJOR_VERSION 0)
-set(MINOR_VERSION 19)
+set(MINOR_VERSION 20)
+set(VERSION ${VERSION_STRING})
 set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION})
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
+set(top_srcdir ${CMAKE_SOURCE_DIR})
 
 # CMake
 if("${CMAKE_BUILD_TYPE}" STREQUAL "")
@@ -12,6 +15,7 @@ endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
 set(CMAKE_COLOR_MAKEFILE ON)
 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
 
+add_definitions(-Wall)
 # Debug build
 message("-- Build type: ${CMAKE_BUILD_TYPE}")
 if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
@@ -97,12 +101,6 @@ option(DOCUMENTATION "Generate API documentation with Doxygen" ON)
 
 find_package(Doxygen)
 if(DOCUMENTATION AND DOXYGEN_FOUND)
-
-   # Set variables
-   set(PACKAGE libftdi)
-   set(VERSION ${VERSION_STRING})
-   set(top_srcdir ${CMAKE_SOURCE_DIR})
-
    # Find doxy config
    message(STATUS "Doxygen found.")
    set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc")