build: fix GNUInstallDirs not working

The project() line needed to go above include(GNUInstallDirs).
This commit is contained in:
Andrew Kelley 2015-09-12 01:34:14 -07:00
parent 685084c64a
commit 673e28aa77

View file

@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 2.8.5)
project(libsoundio C CXX)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
if(CMAKE_VERSION VERSION_LESS 3.0.0)
set(CMAKE_INSTALL_LIBDIR "lib" CACHE PATH "library install dir (lib)")
@ -15,9 +17,6 @@ if(NOT CMAKE_BUILD_TYPE)
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()
project(libsoundio C CXX)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
set(LIBSOUNDIO_VERSION_MAJOR 1)
set(LIBSOUNDIO_VERSION_MINOR 0)
set(LIBSOUNDIO_VERSION_PATCH 1)