Commit 38a2846d authored by Davis King's avatar Davis King

More cmake cleanup

parent 6ffdf802
......@@ -135,7 +135,7 @@ else()
endif()
# include dlib so we can link against it
include(${CMAKE_CURRENT_LIST_DIR}/../cmake)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/.. dlib_build)
# We put the extra _ on the end of the name just so it's possible to
......
......@@ -12,7 +12,7 @@ PROJECT(${target_name})
# compile the dlib/all/source.cpp file into its own object just to make sure it compiles
set(DLIB_TEST_COMPILE_ALL_SOURCE_CPP ON)
include(../cmake)
add_subdirectory(.. dlib_build)
# This variable contains a list of all the tests we are building
# into the regression test suite.
......
......@@ -6,15 +6,15 @@
# create a variable called target_name and set it to the string "test"
set (target_name gui)
PROJECT(${target_name})
project(${target_name})
add_subdirectory(../.. dlib_build)
# 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 test)
ADD_EXECUTABLE(${target_name} main.cpp )
add_executable(${target_name} main.cpp )
# Add the folder containing the dlib folder to the include path
INCLUDE_DIRECTORIES(../../..)
# Tell cmake to link our target executable to dlib.
TARGET_LINK_LIBRARIES(${target_name} dlib )
target_link_libraries(${target_name} dlib::dlib )
......@@ -2,3 +2,4 @@ cmake_minimum_required(VERSION 2.8.12)
add_subdirectory(../../../tools/imglab imglab_build)
add_subdirectory(../../../tools/htmlify htmlify_build)
add_subdirectory(../../../tools/convert_dlib_nets_to_caffe convert_dlib_nets_to_caffe_build)
......@@ -9,13 +9,13 @@ set (target_name dtoc)
PROJECT(${target_name})
include(../../dlib/cmake)
add_subdirectory(../../dlib dlib_build)
ADD_EXECUTABLE(${target_name}
add_executable(${target_name}
main.cpp
)
TARGET_LINK_LIBRARIES(${target_name} dlib::dlib )
target_link_libraries(${target_name} dlib::dlib )
INSTALL(TARGETS ${target_name}
......
......@@ -8,23 +8,23 @@ cmake_minimum_required(VERSION 2.8.12)
# create a variable called target_name and set it to the string "htmlify"
set (target_name htmlify)
PROJECT(${target_name})
project(${target_name})
include(../../dlib/cmake)
add_subdirectory(../../dlib dlib_build)
# 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}
add_executable(${target_name}
htmlify.cpp
to_xml.cpp
)
# Tell cmake to link our target executable to dlib.
TARGET_LINK_LIBRARIES(${target_name} dlib::dlib )
target_link_libraries(${target_name} dlib::dlib )
INSTALL(TARGETS ${target_name}
install(TARGETS ${target_name}
RUNTIME DESTINATION bin
)
......
......@@ -9,11 +9,11 @@ cmake_minimum_required(VERSION 2.8.12)
set (target_name imglab)
PROJECT(${target_name})
include(../../dlib/cmake)
add_subdirectory(../../dlib dlib_build)
# 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 imglab)
ADD_EXECUTABLE(${target_name}
add_executable(${target_name}
src/main.cpp
src/metadata_editor.h
src/metadata_editor.cpp
......@@ -30,11 +30,11 @@ ADD_EXECUTABLE(${target_name}
# Tell cmake to link our target executable to dlib.
TARGET_LINK_LIBRARIES(${target_name} dlib::dlib )
target_link_libraries(${target_name} dlib::dlib )
INSTALL(TARGETS ${target_name}
install(TARGETS ${target_name}
RUNTIME DESTINATION bin
)
INSTALL(PROGRAMS convert_imglab_paths_to_relative copy_imglab_dataset DESTINATION bin )
install(PROGRAMS convert_imglab_paths_to_relative copy_imglab_dataset DESTINATION bin )
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