Commit bbfcf255 authored by Davis King's avatar Davis King

Simplified these cmake files.

parent c7b5b9e8
......@@ -3,11 +3,7 @@
# information about it at http://www.cmake.org
#
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
cmake_minimum_required(VERSION 2.4)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif()
cmake_minimum_required(VERSION 2.6)
# create a variable called target_name and set it to the string "htmlify"
set (target_name htmlify)
......@@ -17,29 +13,18 @@ PROJECT(${target_name})
# add all the cpp files we want to compile to this list. This tells
# cmake that they are part of our target (which is the executable named htmlify)
ADD_EXECUTABLE(${target_name}
htmlify.cpp
to_xml.cpp
)
htmlify.cpp
to_xml.cpp
)
# add the folder containing the dlib folder to the include path
INCLUDE_DIRECTORIES(../..)
# There is a CMakeLists.txt file in the dlib source folder that tells cmake
# how to build the dlib library. Tell cmake about that file.
add_subdirectory(../../dlib dlib_build)
# Tell cmake to link our target executable to the non-gui version of the dlib
# library.
# Tell cmake to link our target executable to dlib.
include(../../dlib/cmake)
TARGET_LINK_LIBRARIES(${target_name} dlib )
INSTALL(TARGETS ${target_name}
RUNTIME DESTINATION bin
)
#set default build type to Release
include(../../dlib/release_build_by_default)
......@@ -12,7 +12,7 @@ set (target_name mltool)
PROJECT(${target_name})
# add all the cpp files we want to compile to this list. This tells
# cmake that they are part of our target (which is the exectuable named mltool)
# cmake that they are part of our target (which is the executable named mltool)
ADD_EXECUTABLE(${target_name}
src/main.cpp
src/regression.cpp
......@@ -24,23 +24,12 @@ ADD_EXECUTABLE(${target_name}
# add the folder containing the dlib folder to the include path
INCLUDE_DIRECTORIES(../..)
# There is a CMakeLists.txt file in the dlib source folder that tells cmake
# how to build the dlib library. Tell cmake about that file.
add_subdirectory(../../dlib dlib_build)
# Tell cmake to link our target executable to the non-gui version of the dlib
# library.
# Tell cmake to link our target executable to dlib.
include(../../dlib/cmake)
TARGET_LINK_LIBRARIES(${target_name} dlib )
INSTALL(TARGETS ${target_name}
RUNTIME DESTINATION bin
)
#set default build type to Release
include(../../dlib/release_build_by_default)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment