From 37512055e13b2aaee85e34eb522f7ae1d7b1ba64 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sun, 6 Sep 2015 21:23:24 +0200 Subject: [PATCH] Revert "Cleanup config setup to make sure defines are set before config.h is generated." This reverts commit 16b4cb93d88161b2397cda53a70555d5eff16420. --- src/libtomahawk/CMakeLists.txt | 11 ++--------- .../CMakeLists.linux.cmake | 0 src/{libtomahawk => tomahawk}/CMakeLists.osx.cmake | 0 src/tomahawk/CMakeLists.txt | 13 +++++++++++++ src/{libtomahawk => tomahawk}/CMakeLists.unix.cmake | 0 .../CMakeLists.win32.cmake | 0 src/{libtomahawk => tomahawk}/Config.h.in | 0 src/{libtomahawk => tomahawk}/TomahawkVersion.h.in | 0 8 files changed, 15 insertions(+), 9 deletions(-) rename src/{libtomahawk => tomahawk}/CMakeLists.linux.cmake (100%) rename src/{libtomahawk => tomahawk}/CMakeLists.osx.cmake (100%) rename src/{libtomahawk => tomahawk}/CMakeLists.unix.cmake (100%) rename src/{libtomahawk => tomahawk}/CMakeLists.win32.cmake (100%) rename src/{libtomahawk => tomahawk}/Config.h.in (100%) rename src/{libtomahawk => tomahawk}/TomahawkVersion.h.in (100%) diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 8addd4c59..7f6300067 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -6,16 +6,9 @@ add_definitions( -DDLLEXPORT_PRO ) add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS ) add_definitions( -DPORTFWDDLLEXPORT_STATIC ) -IF( WIN32 ) - INCLUDE( "CMakeLists.win32.cmake" ) -ENDIF( WIN32 ) -IF( UNIX ) - INCLUDE( "CMakeLists.unix.cmake" ) -ENDIF( UNIX ) - -configure_file(Config.h.in +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -configure_file(TomahawkVersion.h.in +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/TomahawkVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/TomahawkVersion.h) set( libGuiSources diff --git a/src/libtomahawk/CMakeLists.linux.cmake b/src/tomahawk/CMakeLists.linux.cmake similarity index 100% rename from src/libtomahawk/CMakeLists.linux.cmake rename to src/tomahawk/CMakeLists.linux.cmake diff --git a/src/libtomahawk/CMakeLists.osx.cmake b/src/tomahawk/CMakeLists.osx.cmake similarity index 100% rename from src/libtomahawk/CMakeLists.osx.cmake rename to src/tomahawk/CMakeLists.osx.cmake diff --git a/src/tomahawk/CMakeLists.txt b/src/tomahawk/CMakeLists.txt index 9cc2255d8..027af3371 100644 --- a/src/tomahawk/CMakeLists.txt +++ b/src/tomahawk/CMakeLists.txt @@ -109,6 +109,13 @@ INCLUDE_DIRECTORIES( SET( OS_SPECIFIC_LINK_LIBRARIES "" ) +IF( WIN32 ) + INCLUDE( "CMakeLists.win32.cmake" ) +ENDIF( WIN32 ) +IF( UNIX ) + INCLUDE( "CMakeLists.unix.cmake" ) +ENDIF( UNIX ) + IF( APPLE ) SET( CMAKE_LINKER_FLAGS "-headerpad_max_install_names ${CMAKE_LINKER_FLAGS}" ) @@ -123,6 +130,12 @@ ENDIF( QCA2_FOUND ) INCLUDE(GNUInstallDirs) +# currently only in libtomahawk, we might want to properly split what's in which config file +# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in +# ${CMAKE_CURRENT_BINARY_DIR}/config.h) +# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/TomahawkVersion.h.in +# ${CMAKE_CURRENT_BINARY_DIR}/TomahawkVersion.h) + # translations include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake ) add_tomahawk_translations( ${TOMAHAWK_TRANSLATION_LANGUAGES} ) diff --git a/src/libtomahawk/CMakeLists.unix.cmake b/src/tomahawk/CMakeLists.unix.cmake similarity index 100% rename from src/libtomahawk/CMakeLists.unix.cmake rename to src/tomahawk/CMakeLists.unix.cmake diff --git a/src/libtomahawk/CMakeLists.win32.cmake b/src/tomahawk/CMakeLists.win32.cmake similarity index 100% rename from src/libtomahawk/CMakeLists.win32.cmake rename to src/tomahawk/CMakeLists.win32.cmake diff --git a/src/libtomahawk/Config.h.in b/src/tomahawk/Config.h.in similarity index 100% rename from src/libtomahawk/Config.h.in rename to src/tomahawk/Config.h.in diff --git a/src/libtomahawk/TomahawkVersion.h.in b/src/tomahawk/TomahawkVersion.h.in similarity index 100% rename from src/libtomahawk/TomahawkVersion.h.in rename to src/tomahawk/TomahawkVersion.h.in