Skip to content

Commit

Permalink
Make CMakeLists.txt a little more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnberger committed Jan 5, 2015
1 parent 368007d commit b1c1777
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
project(clew)

cmake_minimum_required(VERSION 2.6)
cmake_minimum_required (VERSION 2.6)
if (NOT CMAKE_VERSION VERSION_LESS 2.8.4)
cmake_policy (SET CMP0017 NEW)
endif()

include(CMakeParseArguments)


set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
message(STATUS "Project source dir = ${PROJECT_SOURCE_DIR}")
message(STATUS "Project build dir = ${CMAKE_BINARY_DIR}")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()

include_directories(include)

Expand Down

0 comments on commit b1c1777

Please sign in to comment.