From 9180c8719784d6a8fca73977b8908f62f21abaa6 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 3 Feb 2017 04:19:23 +0100 Subject: [PATCH 1/4] cmake: Put test targets in folders --- CMakeLists.txt | 3 +++ Source/UnitTests/CMakeLists.txt | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e4d510ce0..28c22c546c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,9 @@ include(CheckAndAddFlag) include(CheckCCompilerFlag) include(DolphinCompileDefinitions) +# Enable folders for IDE +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + # Libraries to link set(LIBS) diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt index d2e7344332..1a7c5223b0 100644 --- a/Source/UnitTests/CMakeLists.txt +++ b/Source/UnitTests/CMakeLists.txt @@ -13,7 +13,10 @@ macro(add_dolphin_test target srcs) # Host_ functions. set(srcs2 ${srcs} ${CMAKE_SOURCE_DIR}/Source/UnitTests/TestUtils/StubHost.cpp) add_executable(Test_${target} EXCLUDE_FROM_ALL ${srcs2}) - set_target_properties(Test_${target} PROPERTIES OUTPUT_NAME Tests/${target}) + set_target_properties(Test_${target} PROPERTIES + OUTPUT_NAME Tests/${target} + FOLDER Tests + ) target_link_libraries(Test_${target} ${LIBS}) add_dependencies(unittests Test_${target}) add_test(NAME ${target} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Tests/${target}) From 7ccbe9b06d26cf3652120bf96fa3e88cf19d0647 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 3 Feb 2017 04:24:13 +0100 Subject: [PATCH 2/4] portaudio: Prevent files from being install()'ed --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28c22c546c..d4d732c3ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -570,7 +570,7 @@ if(NOT ANDROID) option(PA_USE_ASIO "Enable PortAudio support for ASIO" OFF) option(PA_USE_DS "Enable PortAudio support for DirectSound" OFF) option(PA_USE_WDMKS "Enable PortAudio support for WDMKS" OFF) - add_subdirectory(Externals/portaudio) + add_subdirectory(Externals/portaudio EXCLUDE_FROM_ALL) set(PORTAUDIO_LIBRARIES portaudio_static) endif() endif() From 0d73f3e3b39039224b00b9b722683805e7e9cf66 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 3 Feb 2017 04:19:53 +0100 Subject: [PATCH 3/4] mbedtls: Remove unwanted "lib" target --- Externals/mbedtls/library/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Externals/mbedtls/library/CMakeLists.txt b/Externals/mbedtls/library/CMakeLists.txt index 5ee394ac5c..22b8b1a711 100644 --- a/Externals/mbedtls/library/CMakeLists.txt +++ b/Externals/mbedtls/library/CMakeLists.txt @@ -146,7 +146,7 @@ if(USE_SHARED_MBEDTLS_LIBRARY) target_link_libraries(mbedtls ${libs} mbedx509) endif(USE_SHARED_MBEDTLS_LIBRARY) -add_custom_target(lib DEPENDS mbedcrypto mbedx509 mbedtls) -if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) - add_dependencies(lib mbedcrypto_static mbedx509_static mbedtls_static) -endif() +#add_custom_target(lib DEPENDS mbedcrypto mbedx509 mbedtls) +#if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) +# add_dependencies(lib mbedcrypto_static mbedx509_static mbedtls_static) +#endif() From 12dd45266e7e1b6375d5833e1ff0545685810ae4 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 3 Feb 2017 04:20:17 +0100 Subject: [PATCH 4/4] portaudio: Remove unwanted shared portaudio library --- Externals/portaudio/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Externals/portaudio/CMakeLists.txt b/Externals/portaudio/CMakeLists.txt index a8b7534cc3..b03b6297cd 100644 --- a/Externals/portaudio/CMakeLists.txt +++ b/Externals/portaudio/CMakeLists.txt @@ -345,11 +345,11 @@ ELSE() SET(PA_PRIVATE_COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS} PA_LITTLE_ENDIAN) ENDIF() -ADD_LIBRARY(portaudio SHARED ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES} ${PA_EXTRA_SHARED_SOURCES}) -SET_PROPERTY(TARGET portaudio APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS}) -TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PRIVATE ${PA_PRIVATE_INCLUDE_PATHS}) -TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PUBLIC include) -TARGET_LINK_LIBRARIES(portaudio ${PA_LIBRARY_DEPENDENCIES}) +#ADD_LIBRARY(portaudio SHARED ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES} ${PA_EXTRA_SHARED_SOURCES}) +#SET_PROPERTY(TARGET portaudio APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS}) +#TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PRIVATE ${PA_PRIVATE_INCLUDE_PATHS}) +#TARGET_INCLUDE_DIRECTORIES(portaudio BEFORE PUBLIC include) +#TARGET_LINK_LIBRARIES(portaudio ${PA_LIBRARY_DEPENDENCIES}) ADD_LIBRARY(portaudio_static STATIC ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES}) SET_PROPERTY(TARGET portaudio_static APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS}) @@ -370,7 +370,7 @@ IF(WIN32 AND MSVC) SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/Win32) ENDIF() ENDIF() - SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX} FOLDER "Portaudio") + #SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX} FOLDER "Portaudio") SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX} FOLDER "Portaudio") ELSE() IF(APPLE AND CMAKE_VERSION VERSION_GREATER 3.4.2) @@ -390,7 +390,7 @@ ELSE() CONFIGURE_FILE(cmake_support/portaudio-2.0.pc.in ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc DESTINATION lib/pkgconfig) INSTALL(FILES ${PA_PUBLIC_INCLUDES} DESTINATION include) - INSTALL(TARGETS portaudio DESTINATION lib) + #INSTALL(TARGETS portaudio DESTINATION lib) ENDIF() ENDIF()