From 16b4cb93d88161b2397cda53a70555d5eff16420 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Fri, 4 Sep 2015 14:55:37 +0200 Subject: [PATCH] Cleanup config setup to make sure defines are set before config.h is generated. --- .../CMakeLists.linux.cmake | 0 src/{tomahawk => libtomahawk}/CMakeLists.osx.cmake | 0 src/libtomahawk/CMakeLists.txt | 11 +++++++++-- src/{tomahawk => libtomahawk}/CMakeLists.unix.cmake | 0 .../CMakeLists.win32.cmake | 0 src/{tomahawk => libtomahawk}/Config.h.in | 0 src/{tomahawk => libtomahawk}/TomahawkVersion.h.in | 0 src/tomahawk/CMakeLists.txt | 13 ------------- 8 files changed, 9 insertions(+), 15 deletions(-) rename src/{tomahawk => libtomahawk}/CMakeLists.linux.cmake (100%) rename src/{tomahawk => libtomahawk}/CMakeLists.osx.cmake (100%) rename src/{tomahawk => libtomahawk}/CMakeLists.unix.cmake (100%) rename src/{tomahawk => libtomahawk}/CMakeLists.win32.cmake (100%) rename src/{tomahawk => libtomahawk}/Config.h.in (100%) rename src/{tomahawk => libtomahawk}/TomahawkVersion.h.in (100%) diff --git a/src/tomahawk/CMakeLists.linux.cmake b/src/libtomahawk/CMakeLists.linux.cmake similarity index 100% rename from src/tomahawk/CMakeLists.linux.cmake rename to src/libtomahawk/CMakeLists.linux.cmake diff --git a/src/tomahawk/CMakeLists.osx.cmake b/src/libtomahawk/CMakeLists.osx.cmake similarity index 100% rename from src/tomahawk/CMakeLists.osx.cmake rename to src/libtomahawk/CMakeLists.osx.cmake diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 7f6300067..8addd4c59 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -6,9 +6,16 @@ add_definitions( -DDLLEXPORT_PRO ) add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS ) add_definitions( -DPORTFWDDLLEXPORT_STATIC ) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/Config.h.in +IF( WIN32 ) + INCLUDE( "CMakeLists.win32.cmake" ) +ENDIF( WIN32 ) +IF( UNIX ) + INCLUDE( "CMakeLists.unix.cmake" ) +ENDIF( UNIX ) + +configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/TomahawkVersion.h.in +configure_file(TomahawkVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/TomahawkVersion.h) set( libGuiSources diff --git a/src/tomahawk/CMakeLists.unix.cmake b/src/libtomahawk/CMakeLists.unix.cmake similarity index 100% rename from src/tomahawk/CMakeLists.unix.cmake rename to src/libtomahawk/CMakeLists.unix.cmake diff --git a/src/tomahawk/CMakeLists.win32.cmake b/src/libtomahawk/CMakeLists.win32.cmake similarity index 100% rename from src/tomahawk/CMakeLists.win32.cmake rename to src/libtomahawk/CMakeLists.win32.cmake diff --git a/src/tomahawk/Config.h.in b/src/libtomahawk/Config.h.in similarity index 100% rename from src/tomahawk/Config.h.in rename to src/libtomahawk/Config.h.in diff --git a/src/tomahawk/TomahawkVersion.h.in b/src/libtomahawk/TomahawkVersion.h.in similarity index 100% rename from src/tomahawk/TomahawkVersion.h.in rename to src/libtomahawk/TomahawkVersion.h.in diff --git a/src/tomahawk/CMakeLists.txt b/src/tomahawk/CMakeLists.txt index 027af3371..9cc2255d8 100644 --- a/src/tomahawk/CMakeLists.txt +++ b/src/tomahawk/CMakeLists.txt @@ -109,13 +109,6 @@ 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}" ) @@ -130,12 +123,6 @@ 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} )