Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cmake/Targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (BUILD_TESTS)
endif()

find_host_package(Boost 1.40 REQUIRED ${BOOST_LIBRARIES})
include_directories(${Boost_INCLUDE_DIR} )
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})

file(MAKE_DIRECTORY ${out_dir})
Expand Down Expand Up @@ -40,10 +40,10 @@ else()
add_library(ed2k STATIC ${headers} ${headers_kad} ${sources} ${sources_kad})
endif()

set_target_properties(ed2k PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${out_dir} )
set_target_properties(ed2k PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${out_dir})
set_target_properties(ed2k PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_dir})
set_target_properties(ed2k PROPERTIES LINK_FLAGS ${l_flags})
set_target_properties(ed2k PROPERTIES COMPILE_FLAGS ${cxx_flags})
set_target_properties(ed2k PROPERTIES LINK_FLAGS "${l_flags}")
set_target_properties(ed2k PROPERTIES COMPILE_FLAGS "${cxx_flags}")

target_compile_definitions(ed2k PRIVATE ${cxx_definitions})

Expand All @@ -52,13 +52,13 @@ if (BUILD_TOOLS)
file(GLOB_RECURSE component_headers test/${ed2k_component}/*hpp)
file(GLOB_RECURSE component_sources test/${ed2k_component}/*cpp)
add_executable(${ed2k_component} ${headers} ${component_headers} ${component_sources})
set_target_properties(${ed2k_component} PROPERTIES COMPILE_FLAGS ${cxx_flags})
set_target_properties(${ed2k_component} PROPERTIES LINK_FLAGS ${l_flags})
set_target_properties(${ed2k_component} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${out_dir})
set_target_properties(${ed2k_component} PROPERTIES COMPILE_FLAGS "${cxx_flags}")
set_target_properties(${ed2k_component} PROPERTIES LINK_FLAGS "${l_flags}")
set_target_properties(${ed2k_component} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${out_dir})
target_compile_definitions(${ed2k_component} PRIVATE ${cxx_definitions})
target_link_libraries(${ed2k_component} ed2k)
# link boost and system libraries
TARGET_LINK_LIBRARIES(${ed2k_component} ${Boost_LIBRARIES} )
TARGET_LINK_LIBRARIES(${ed2k_component} ${Boost_LIBRARIES})
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(NOT ANDROID)
target_link_libraries(${ed2k_component} pthread rt)
Expand Down