build/omj.pri
changeset 78 71ad690e91f5
parent 67 63b81d807542
equal deleted inserted replaced
72:1f0034e370aa 78:71ad690e91f5
    17 
    17 
    18 omj {
    18 omj {
    19 
    19 
    20   # Load project defines (if not already loaded). Fail if can not loaded.
    20   # Load project defines (if not already loaded). Fail if can not loaded.
    21   !include(../inc/build_defines.pri):error(Could not load build_defines.pri)
    21   !include(../inc/build_defines.pri):error(Could not load build_defines.pri)
       
    22 
       
    23   # Sanity check - otherwise components may fail e.g. with ODC file "what" target
       
    24   PRO_FILE_BASE = $$basename(_PRO_FILE_)
       
    25   !contains(PRO_FILE_BASE,$${TARGET}.pro) {
       
    26      error(Target name $${TARGET} does not match file name of $${_PRO_FILE_})
       
    27   }
    22 
    28 
    23   # Allow JAVATARGET to be used for defining the Java project name (java artifacts)
    29   # Allow JAVATARGET to be used for defining the Java project name (java artifacts)
    24   isEmpty(JAVATARGET): JAVATARGET = $${TARGET}
    30   isEmpty(JAVATARGET): JAVATARGET = $${TARGET}
    25 
    31 
    26   !contains(TARGET, javautils): LIBS += -ljavautils
    32   !contains(TARGET, javautils): LIBS += -ljavautils
   152 
   158 
   153   # Find the project depth
   159   # Find the project depth
   154   TRY_DIR=$${_PRO_FILE_PWD_}
   160   TRY_DIR=$${_PRO_FILE_PWD_}
   155   for(a, 1..10): {
   161   for(a, 1..10): {
   156      TRY_DIR = $$join(TRY_DIR,,,/..)
   162      TRY_DIR = $$join(TRY_DIR,,,/..)
   157      exists($${TRY_DIR}/build/Makefile.comp) DEPTH=$${a}
   163      exists($${TRY_DIR}/build/omj.pri) DEPTH=$${a}
   158   }
   164   }
   159 
   165 
   160   # Make include paths
   166   # Make include paths
   161   INC_DIR = inc
   167   INC_DIR = inc
   162   for(a, 1..$${DEPTH}) {
   168   for(a, 1..$${DEPTH}) {